Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Activate sheet Version 6 (Net)

Группа действийAction group: Excel 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: 
    Image Added
  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.
    Image Added
  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").
    Image Added
  4. Configure parameters for the "Save" action. Specify the context of the Excel document in the "Context" parameter. 
    Image Added
  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.

...

Индекс листа

...

Наименование листа, к которому будет применено действие.

...

Порядковый номер листа, к которому будет применено действие.
Порядковый номер начинается с "1".

...

Особые условия использования

Если параметр указывает на скрытый лист, действие завершится ошибкой.

Если оба параметра "Имя листа" и "Индекс листа" не указаны, будет вызвана ошибка.

Пример  использования 

Задача

Имеется Excel-документ под названием "Test" с тремя вкладками Sheet1, Sheet2, Sheet3. Активная вкладка - Sheet1. Необходимо сделать активной вкладку Sheet3. 

Решение

Воспользоваться действиями "Открыть", "Активировать лист", "Сохранить". 

Реализация

...

Результат

Программный робот отработал успешно. Лист 3 в Excel-документе активирован.