Set Cell
Set Cell
Section titled “Set Cell”Type: set-cell · Package: DataTable Activities v1.0.5 · Output: none
Sets the value of a column in a row (DataRow).
How it works
Section titled “How it works”Writes value to the column of the row. The value is converted to the column type (for example, "42" to int). A null or an empty string leaves the cell empty (DBNull). If the column type is object, the value is stored as is.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
row | DataRow | — | The row to modify, e.g. row. |
column | string | — | Column name (case-insensitive). |
value | object | — | The value to set (converted to the column type). |
Optional parameters
Section titled “Optional parameters”None.
Output
Section titled “Output”This activity does not return a value; it modifies the row in place.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'row' must evaluate to a DataRow. | row is not a row (for example, null because Find Data Row found nothing). |
'column' is required. | The column name is missing. |
Column '…' does not exist. Available columns: …. | The column does not exist in the row’s table; the message lists the real ones. |
A value is not compatible with the type '…' of column '…'. | The value cannot be converted to the column type (e.g. text in an int column). Convert it first or use a column of another type. |
Example
Section titled “Example”Mark each row as processed while looping through the table:
For Each items = orders itemVariable = row └─ activities: Set Cell row = row column = "Status" value = "Processed" Set Cell row = row column = "ProcessedAt" value = now()
Write Excel Sheet path = "C:/out/orders.xlsx" data = ordersRelated activities
Section titled “Related activities”- Update Data Row — change several columns at once.
- Get Cell — read a cell.
- For Each — loop through the rows of a table.