Copy sheet Version 3 (Net)
Action group: Excel
Description
The action copies the sheet to the specified document.
Action icon
Settings of parameters
Property | Description | Type | Example of filling in | Obligatory to fill in the field |
Parameters | ||||
Source context | The context of the file from which the sheet will be taken. | Excel instance | Excel instance | Yes |
Target context | The context of the file where the sheet will be inserted. If not selected, the source context file will be taken. | Excel instance | Excel instance | No |
Sheet identification method | Parameter specifies the method of sheet identification: via name or index | String | Yes | |
Sheet name |
| String | No | |
Sheet index | The sequence number of the sheet to which the action will be applied. The sequence number starts with "1". | Numeric | No | |
Copied sheet name | The sheet name that will be assigned to the copied sheet. | String | No |
Special conditions of use
None
Example of use
Task
There is an Excel document with a sheet "To copy". You need to copy this sheet and create the same one in the same document, but with the name "New".
Solution
Use the actions "Open", "Copy sheet", "Save".
Implementation
- Assemble a robot scheme consisting of actions:
- Set the parameters of the "Open" action.
- Specify in the "PathToFile" field the path to the required file.
- In the "Open Visible" field specify checkbox = true.
- Customize the parameters of the "Copy sheet" action.
- In the "Source context" field specify the context of the open document.
- In the "Sheet identification method" field specify the value "via sheet name"
- In the "Sheet name" field specify the value of the sheet to be copied.
- In the "Copy sheet name" field specify the name of the new sheet.
4. Customize the "Save" action parameter.
5. Launch the robot using the "Start" button in the top panel.
Optional. To copy an Excel sheet into another Excel document, you must link the documents before doing so.
Result
The software robot completed successfully. The copied sheet "New 1" has been added to the document.