Remove Activity
The Remove activity enables users to clear the content of specific cells, rows, or columns within an Excel file. This activity is essential for data manipulation tasks where existing data needs to be removed or reset.
| Field | Description | Requirement |
|---|---|---|
| Excel Name | Specifies the reference name of the Excel file that has been previously opened or created. | Required |
| Sheet Name | Defines the name of the worksheet to operate on. If left blank, the activity defaults to the first sheet in the workbook. | Optional |
| Sheet Index | Specifies the zero-based index of the worksheet to operate on. If left blank, the activity defaults to the first sheet (index 0). | Optional |
| Rows | Specifies the row index or a range of row indices to clear. Use a colon (e.g., 1:5) to define a range. | Optional |
| Column | Specifies the column name (e.g., 'A'), column index (e.g., '1'), or column heading to clear. Multiple columns can be specified by separating them with commas (e.g., A, B or 1, 2). | Optional |
Action Types & Examples
Clear by Sheet Name
- Format:
string - Example Result:
"Sheet1"
Clear by Sheet Index
- Format:
digit - Example Result:
5
Clear Specific Rows
- Format:
string - Example Result:
"1:5"
Clear Specific Columns
- Format:
string - Example Result:
"A, B"
Implementation Examples
Field Setup - Excel Name: newExcel - Sheet Name: Sheet1 - Rows: 1:5 - Column: A, B
Execution Parameters - Excel Name: myWorkbook - Sheet Name: DataSheet - Rows: 1 - Column: C
Technical Notes
When specifying a sheet, either Sheet Name or Sheet Index can be used. If both are left blank, the activity targets the first sheet by default. To clear an entire row, provide the row index in the Rows field and leave the Column field blank. To clear an entire column, provide the column identifier (name or index) in the Column field and leave the Rows field blank. In Excel, rows are typically 1-based (e.g., row 1 is the first row). While column identifiers can be letters (A, B, C) or 1-based numbers, some internal systems may refer to columns using a 0-based index. When specifying columns by index, ensure to use the correct 0-based or 1-based convention as expected by the underlying system.