Rename sheet Version 2 (Net)

Action group: Excel 


Description

The action allows you to rename a sheet in Excel.

Icon


Settings of parameters

 

Property

Description

Type

Example of filling in

Obligatory to fill in the field

Parameters

Context
Action context for working with Excel documentsExcel instanceEXCEL_INSTANCEYes
Sheet identification method

A drop-down list of elements: "Via sheet name", "Via sheet index"

Selects whether to identify the sheet to be renamed by name or by index

String
Yes
Sheet name
Name of the sheet to which the action will be applied. If the parameter indicates a hidden sheet, the action will cause an error.String
No
Sheet index
The sequence number of the sheet to which the action will be applied. The numbering starts with "1". If the parameter indicates a hidden sheet, the action will cause an error.Numeric
No
New sheet name
The new name of the sheet. The name must not exceed 31 characters in length, contain ":", "/", "\", "?", "*", "[" and "]", otherwise the action will fail.String
Yes

Special conditions of use

The robot will return an error if:

  • a parameter indicates a hidden sheet;
  • non-existent data for sheet identification is entered;
  • an incorrect "New sheet name" is entered. 
    • Sheet names must not be empty, must not exceed 31 characters and must not contain colons, slashes, question marks, asterisks and square brackets.


If the user enters values in both fields "Sheet name" and "Sheet index", the robot will not generate an error. The selection will be made in the way specified in "Sheet identification method".


Example of use  


Task: you need to rename the first sheet in an Excel document to "New sheet". 

Solution: use the actions "Open", "Rename sheet", "Save".

Implementation:

  1. Assemble a robot scheme from the actions:
  2. Customize the "Open" action parameter.

  3. Customize the parameters of the "Rename sheet" action.
  4. Customize the "Save" action parameter. 
  5. Launch the robot using the "Start" button in the top panel. 

Result:

The software robot worked successfully. 

The first sheet in the document has been renamed. 

  • Нет меток