Copy/Remove Sheet Activity
The Copy/Remove Sheet activity enables users to manage sheets within Excel files. It facilitates copying data from a specified range to a new sheet or removing an existing sheet. This activity streamlines Excel automation by providing direct control over sheet manipulation.
| Field | Description | Requirement |
|---|---|---|
| Excel name | The reference name of the Excel file which has already been opened or created is chosen from the dropdown. | Required |
| Sheet name | The name of the sheet to work in Excel can be added. If not added, it is accepted as the first sheet by default. When the "Action" property is selected as "Remove", the "Sheet Name" field must be filled. | Optional |
| Sheet index | The index of the sheet to work in Excel. If not added, it takes the first sheet by default. | Optional |
| Action | The desired action is selected. | Required |
| Source excel | The Excel reference name from which the data will be received is chosen from the dropdown. | Optional |
| New sheet name | The name of the new sheet to create in Excel is written. | Optional |
| Copy as value | If this checkbox is selected, formulas in Excel will be copied as a value rather than as formulas. | Optional |
Action Types & Examples
COPY
- Format: [string]
- Example Result:
"COPY"
REMOVE
- Format: [string]
- Example Result:
"REMOVE"
Implementation Examples
Field Setup - Sheet name: \Sheet1`-Sheet index: `5`-Action: `COPY`-New sheet name: `NewSheet`-Copy as value: `true``
Execution Parameters - Excel name: \${newExcel}`-Source excel: `${copyExcel}``
Technical Notes
The 'Sheet name' field can be left blank if the operation is intended for the first sheet of the Excel file. However, if the 'Action' property is selected as 'Remove', the 'Sheet Name' field must be explicitly filled. When performing a 'Copy' operation within the same Excel file, both the 'New sheet name' and 'Sheet name' fields should be configured. For 'Copy' operations involving different Excel files, the 'Source excel', 'New sheet name', and 'Sheet name' fields are mandatory.