Activate sheet Version 6 (Net)

Action group: Excel  


Description

Sets the active sheet of the document.

Icon

Settings of parameters

Property

Description

Type

Example of filling in

Obligatory to fill in the field

Parameters

ContextThe unique identifier of the session to which the action will be applied.Excel instanceEXCEL_INSTANCEYes
Sheet identifier

Specifies whether the sheet will be defined via name or index.


Drop-down list:

  • via sheet name
  • via sheet index

After selecting the value of this field, the action will refer to either the value of the "Sheet name" field or the value of the "Sheet index" field.

String

Sheet index

Yes
Sheet name

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

StringSheet1No
Sheet index

The sequence number of the sheet to which the action will be applied.
The sequence number starts with "1".

Numeric1No

Special conditions for use

If the parameter points to a hidden sheet, the action will result in an error.

If both parameters "Sheet name" and "Sheet index" are not specified, an error will be generated.

Example of use 

Task

There is an Excel document called "Test" with three tabs Sheet1, Sheet2, Sheet3. The active tab is Sheet1. It is necessary to make the Sheet3 tab active.

Solution

Use the actions "Open", "Activate sheet", "Save".

Implementation

  1. Assemble a robot scheme consisting of actions: 
  2. Configure parameters for the "Open" action. In the "PathToFile" field, specify the path to the required Excel file. Check the "Open Visible" = true checkbox to display the robot actions on the screen.
  3. Customize parameters for the "Activate sheet" action. In the "Context" field specify the context of the opened document, in the "Sheet identification method" field specify " Via sheet name", in the "Sheet name" field specify the name of the sheet to be made active (in this case "Sheet3").
  4. Configure parameters for the "Save" action. Specify the context of the Excel document in the "Context" parameter. 
  5. Launch the robot using the "Start" button in the top panel.  

Result

The software robot completed successfully. Sheet 3 in the Excel document is activated.

  • Нет меток