Skip to main content

Write to Excel column

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

This command allows you to write, insert, or append values to a specific column in a worksheet. You can choose to write data to an entire column or to specified row positions within a column, offering flexibility in how you populate Excel data.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Excel instance

Please select an Excel instance to identify the instance to operate on

Yes

Must be created via the "Launch Excel" or "Get active Excel worksheet" command

Worksheet name

Specify the worksheet name

No

Leave blank for the active worksheet

Write mode

Select how to write data to the row

Append, Insert, Overwrite

Yes

Column

Specify the column using either a number (1 = first, -1 = last) or a letter (e.g., A, B, C)

Yes

Input mode

Select to write from a start row down, or to specific rows with values

Write to an entire column, Specified column(s)

Yes

Value to write

When using "Specified column(s)" mode, specify the row number and content to write

Yes

For specific rows

Start row

Specify the row number to start writing from

Yes*

Required when using "Write to an entire column" mode; Use 1 for the first row, or -1 for the last row

Value to write

For entire column mode, select a list or enumerable variable

Yes*

Required when using "Write to an entire column" mode

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

This action doesn't produce any variables.


Using Variables in Conditions

You can use variables in parameters by clicking the {x} icon next to input fields. This allows you to dynamically set values such as the worksheet name, column identifier, or values to write based on previously calculated or retrieved data. For example, you could use a variable to specify which column to write to based on user input or application logic.


Notes

  • Before using this command, ensure that a valid Excel instance has been created and is open.

  • The "Write to an entire column" option requires a list or enumerable variable (such as an array, list, or data table column).

  • When using "Specified column(s)" mode, you can add multiple row/value pairs by clicking the "Click to add" button.

  • Column identifiers can be specified either as numbers (1 for first column) or Excel-style letters (A, B, C).

  • If the specified worksheet does not exist, the command will result in an error.

  • The "Append" write mode adds data to the end of existing data, while "Insert" shifts existing data down, and "Overwrite" replaces existing data.

Did this answer your question?