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


The name of the sheet to which the action will be applied.

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 

  1. Собрать схему робота, состоящую из действий: 
  2. Set the parameters of the "Open" action.
    1. Specify in the "PathToFile" field the path to the required file. 
    2. In the "Open Visible" field specify checkbox = true. 
  3. Customize the parameters of the "Copy sheet" action.
    1. In the "Source context" field specify the context of the open document.
    2. In the "Sheet identification method" field specify the value "via sheet name"
    3. In the "Sheet name" field specify the value of the sheet to be copied.
    4. 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.

  • Нет меток