Skip to main content
Version: Current

Write Range

Description​

The Write Range activity writes data from a DataTable to a worksheet within an Excel workbook.

Data is written starting at a specified cell, or after the last used row when Append to End is enabled, and expands automatically to accommodate all rows and columns contained in the DataTable.


Common settings​

Use Process Data to bind supported inputs to workflow values or upstream outputs. See Common Activity Features for shared execution, error-handling, and output-persistence settings. Availability depends on the activity.

Design-Time Configuration​

Workbook Configuration​

This activity requires an Excel workbook.

Learn more → Excel Workbook Configuration


Worksheet Selection​

This activity operates on a worksheet within the workbook.

Learn more → Excel Worksheet Selection


Data Table​

DataTable containing the data to write to the worksheet.

Each DataTable row is written as a worksheet row, and each DataTable column is written as a worksheet column.


Append to End​

When enabled, writes the DataTable after the last used row of the worksheet.

Default value is False.

Configure this checkbox at design time. Append to End does not support Process Data variables or Liquid expressions.

When Append to End is enabled, Starting Cell is ignored.


Starting Cell​

Top-left cell where writing begins.

Examples:

  • A1
  • B5
  • D10

Default value is A1.

Ignored when Append to End is enabled.


Add Headers​

Determines whether DataTable column names are written as the first row.

When enabled:

  • DataTable column names are written to the worksheet.
  • Data rows begin on the next row.

When disabled:

  • Only DataTable row data is written.

Default value is False.

This property still applies when Append to End is enabled.


Behavior​

When Append to End is disabled, the activity writes the contents of the DataTable to the worksheet starting at the specified cell. Existing worksheet data within the destination area may be overwritten.

When Append to End is enabled, the activity writes after the last used row of the worksheet. If the worksheet is empty, writing starts at A1. Otherwise, writing starts at the next empty row in the left column of the used range.

The required worksheet range is automatically determined based on the number of rows and columns in the DataTable.


Outputs​

This activity does not produce any activity-specific outputs.


Execution settings​

Configure Wait All Incoming when execution paths converge, and On Error for failure handling. Select Inherit where available to use the workflow-level error policy.

Example: Export two rows​

Bind a DataTable with two columns and two rows, set Starting Cell to B2, and enable Add Headers. The write occupies B2:C4. With Add Headers off, it occupies B2:C3.

Values inside that destination area can be replaced. Cells outside it are not part of this write, so clear a larger old output area separately if stale rows must be removed.