Contact Us 1-800-596-4880

Write to Excel File

Use the Write to Excel File action step if you want to write the content you have read from an Excel file using the Read from Excel File action step either to the same or a different destination file.

The Write to Excel File action step can only be used inside an Excel Session. Specify the destination file in the Excel Session.

Properties

Excel Operation Settings

  • Add Sheet name if doesn’t exist If you select the checkbox here, the sheet will be created new if it does not already exist.

  • Column This is where you enter the column to which you are writing. You can enter letters or numbers in this field. If you enter a number, this will correspond to the number of the column in the Excel file.

    • Example: Instead of A for column A, you can enter a 1 for column A, a 2 for column B (instead of the letter B), and so on.

  • Overwrite content This is where you determine whether a cell, row or column which already has content is overwritten with new content.

  • Range (drop-down selection, default: Cell) There are three different modes available:

    • Cell If you select Cell, the text will be written to a specific cell.

    • Row If you select Row, the text will be written to a specific row.

    • Column If you select Column, the text will be written to a specific column.

  • Row This is where you enter the precise cell or row number to which text is to be written.

  • Sheet name Name of the spreadsheet. Under Properties you can only enter the name directly, unlike in the Write to Excel File Wizard.

  • Text to write This is where you enter the free text that will populate the cell, row or column.

  • Write value as Here you can see whether the data in a cell is written as text or number.

Inbound Variables

  • Sheet name Name of the spreadsheet.

  • Column This is where you enter the column to which you are writing. You can enter letters or numbers in this field. If you enter a number, this will correspond to the number of the column in the Excel file.

  • Row This is where you enter the precise cell or row number to which text is to be written.

  • Text to write This is where you enter the free text that will populate the cell, row or column.

  • Array to write This variable is only used in Row and Column mode. It accepts an array as well as a string in CSV format.

Outbound Variables

IsWritten (Bool) This is how you check whether the text has been successfully written to a specific cell, row or column. The result is True if the text was written successfully to the destination file.

Wizard

The Sheet name field is for selecting the spreadsheet to which text should be written. You can type directly into the input field, select an existing sheet from the drop-down list or connect with a Pin Variable. The drop-down list contains all the sheets saved within the Excel file.

If you add a checkmark next to Add sheet if it doesn’t exist, the sheet will be created new if it doesn’t already exist. You can also connect here with a Pin Variable.

In Excel Mode you specify via the drop-down list whether to write to a cell, a row or an entire column. You can enter letters or numbers as a value or connect with a Pin Variable.

Under Write value as you specify whether the data in a cell is to be written as text or number. This function is only active if you have selected the Cell mode under Excel mode.

This is useful to avoid errors in calculations. If you enter a number and select Write value as Number, the value is treated as a number in the Excel sheet. The original formatting of the cell in the target file is retained.

In the Text to write field you can enter free text which is to be written to the Excel file or you can insert text via a Pin Variable. Text to write appears if you have selected Cell mode. In the Row and Column modes you will find the option Array to write at this point.

Selecting the checkbox next to Overwrite content with text will overwrite a pre-populated cell, row or column with new content. You can also connect here with a Pin Variable.