История страницы
...
Delete sheet Version 7 (Net)
Группа действийAction group: Excel Excel
Описание
Удаляет лист из документа.
Иконка
Параметры
Входные параметры
Контекст Уникальный идентификатор сеанса, к которому будет применено действие.
Способ идентификации листа Определяет способ идентификации листа через имя или индекс.
Имя листа Наименование листа, к которому будет применено действие.
Индекс листа Порядковый номер листа, к которому будет применено действие.
Настройки
...
Свойство
...
Англ. наименование
...
Описание
...
Тип
...
Пример заполнения
...
Обязательность заполнения поля
...
Параметры
...
Sheet Identification Method
Определяет способ идентификации листа через имя или индекс.
Выпадающий список:
- Имя листа
- Индекс листа
После выбора значения этого поля, действие будет обращаться либо к значению поля "Имя листа", либо к значению поля "Индекс листа".
...
Индекс листа
...
Наименование листа, к которому будет применено действие.
...
Порядковый номер листа, к которому будет применено действие.
Порядковый номер начинается с "1".
...
Особые условия использования
Единственный существующий лист удалить нельзя, будет вызвана ошибка.
Активный лист не меняется, если не он был выбран на удаление.
Если был удален активный лист, то активным становится следующий по порядку, если он существует.
Если следующего листа не существует, активизируется предыдущий.
Пример использования
Задача
В Excel-документе имеется 2 листа с названиями "Лист 1" и "Лист 2". Требуется удалить "Лист 2".
Решение
Воспользоваться действиями "Открыть", "Удалить лист", "Сохранить".
Реализация
...
Description
Deletes a sheet from the document.
Icon
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 identification method | Specifies a way to identify a sheet through a 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 of use
The only existing sheet cannot be deleted, an error will be caused.
The active sheet does not change if it is not the one selected for deletion.
If an active sheet has been deleted, the next sheet in order, if it exists, becomes active.
If the next sheet does not exist, the previous sheet is activated.
Example of use
Task
An Excel document has 2 sheets named "Sheet1" and "Sheet2". You need to delete "Sheet2".
Solution
Use the actions "Open", "Delete sheet", "Save".
Implementation
- Assemble a robot scheme consisting of actions:
- Customize the parameters of the "Open" action. In the "Path to file " field, specify the path to the required Excel file. Checkbox Open Visible = true to display the robot actions on the screen.
- Customize the parameters of the "Delete sheet" action. In the "Context" field specify the context of the opened document, in the "Sheet identification method" field select "Via sheet name", in the "Sheet name" field specify the value "Sheet2". Leave the "Sheet index" field empty because the search will be performed by sheet name.
Customize the parameters of 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 robot completed successfully. Sheet2 is deleted from the document.
...
Запустить робота по кнопке "Старт" в верхней панели.
Результат
Робот отработал успешно. Лист 2 удален из документа.