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

Ключ

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

...

Delete sheet Version 7 (Net)

Группа действийAction group: Excel Excel  

Описание

Удаляет лист из документа.  

Иконка

Image Removed

Параметры

Входные параметры  

Контекст                                               Уникальный идентификатор сеанса, к которому будет применено действие.

Способ идентификации листа            Определяет способ идентификации листа через имя или индекс.

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

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

Настройки

...

Свойство

...

Англ. наименование

...

Описание

...

Тип

...

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

...

Обязательность заполнения поля

...

Параметры

...

Sheet Identification Method

Определяет способ идентификации листа через имя или индекс.

Выпадающий список:

  • Имя листа
  • Индекс листа

После выбора значения этого поля, действие будет обращаться либо к значению поля "Имя листа", либо к значению поля "Индекс листа".

...

Индекс листа

...

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

...

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

...

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

Единственный существующий лист удалить нельзя, будет вызвана ошибка.

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

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

Если следующего листа не существует, активизируется предыдущий.

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

Задача

В Excel-документе имеется 2 листа с названиями "Лист 1" и "Лист 2". Требуется удалить "Лист 2". 

Решение

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

Реализация

...

Description

Deletes a sheet from the document.   

Icon

Image Added

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 identification method

Specifies a way to identify a sheet through a 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 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

  1. Assemble a robot scheme consisting of actions: 
    Image Added
  2. 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. 
    Image Added
  3. 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.
    Image Added
  4. Customize the parameters of 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 robot completed successfully. Sheet2 is deleted from the document. 

Image Added

...

Запустить робота по кнопке "Старт" в верхней панели. 

Результат

Робот отработал успешно. Лист 2 удален из документа. Image Removed