История страницы
...
Activate sheet Version 6 (Net)
Группа действийAction group: Excel Excel
Описание
Устанавливает активный лист документа.
...
Description
Sets the active sheet of the document.
Icon
Параметры
Входные параметры
Контекст Уникальный идентификатор сеанса, к которому будет применено действие.
Идентификатор листа Определяет через имя или индекс будет определен лист.
Имя листа Наименование листа, к которому будет применено действие.
Индекс листа Порядковый номер листа, к которому будет применено действие.
Настройки
...
Свойство
...
Англ. наименование
...
Описание
...
Тип
...
Пример заполнения
...
Обязательность заполнения поля
...
Параметры
...
Определяет через имя или индекс будет определен лист.
Выпадающий список:
- Имя листа
- Индекс листа
После выбора значения этого поля, действие будет обращаться либо к значению поля "Имя листа", либо к значению поля "Индекс листа".
...
Индекс листа
...
Наименование листа, к которому будет применено действие.
...
Порядковый номер листа, к которому будет применено действие.
Порядковый номер начинается с "1".
...
Особые условия использования
Если параметр указывает на скрытый лист, действие завершится ошибкой.
Если оба параметра "Имя листа" и "Индекс листа" не указаны, будет вызвана ошибка.
Пример использования
Задача
Имеется Excel-документ под названием "Test" с тремя вкладками Лист 1, Лист 2, Лист 3. Активная вкладка - Лист 1. Необходимо сделать активной вкладку Лист 3.
Решение
Воспользоваться действиями "Открыть", "Активировать лист", "Сохранить".
Реализация
...
Settings of parameters
Property | Description | Type | Example of filling in | Obligatory to fill in the field |
---|---|---|---|---|
Parameters | ||||
Context | The unique identifier of the session to which the action will be applied. | Excel instance | EXCEL_INSTANCE | Yes |
Sheet identifier | Specifies whether the sheet will be defined via name or index. Drop-down list:
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. | String | Sheet1 | No |
Sheet index | The sequence number of the sheet to which the action will be applied. | Numeric | 1 | No |
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
- Assemble a robot scheme consisting of actions:
- 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.
- 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").
- Configure parameters for the "Save" action. Specify the context of the Excel document in the "Context" parameter.
- 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.
...
Результат
Программный робот отработал успешно. Лист 3 в Excel-документе активирован.