Activate sheet Version 1 (Python)

Action group: Office


Description

The action makes the worksheet active. If both parameters "Sheet name" and "Sheet index" are not specified, an error will be thrown

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextAction context for ods/xlsx documentRobin.OpenSheetD oc
Yes
Sheet identification methodThe parameter sets the identification method of the sheet to activate: via name or indexRobin.String
Yes
Sheet nameThe name of the sheet to which the action will be applied. If the parameter points to a hidden sheet, the action will fail.Robin.String
No
Sheet indexSequence number of the sheet to apply the action to. The sequence number starts with «1». If the parameter points to a hidden sheet, the action will fail.Robin.Numeric
No

Special conditions of use

None.

Example of use

Task 

There is a document called Test with a filled sheet "Sheet1" and a blank sheet "Sheet2":

You need to copy the data from sheet "Sheet1", switch to sheet "Sheet2", paste the values and save the document. 

Solution

Use the actions "Open", "Take table", "Activate sheet", "Insert table", "Save". 

Implementation

  1. Assemble a robot scheme consisting of actions:

  2. Set the parameter for the "Open" action.

  3. Set the parameter for the "Take table" action.
  4. Set the parameter for the "Activate sheet" action.
  5. Set the parameter for the "Insert table" action.
  6. Set the parameter for the "Save" action.

  7. Launch the robot using the "Start" button in the top panel.

Result

The program robot completed successfully.

The data was copied from sheet "Sheet1" to sheet "Sheet2":

  • Нет меток