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

Ключ

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

...

When "false", the first row will leave the first row in the table content part, and the default names will be used in the header - 1, 2, 3, etc.

Example:

Из excel забираем таблицуFrom excel we get the table:
image2024-1-16_16-19-12.png

При включенном параметре в логе будет указано "СтолбцовWith this option enabled, the log will show "Columns: 3; строкRows: 2", т.к. Первая строка взятой области стала заголовком с названиями столбцов "№" because the first row of the taken area has become a header with the column names "No.", "Title" и and "Tests". К этим заголовкам нельзя обратиться как к строке данных, чтобы прочитать, но можно использовать имена столбцов, чтобы обратиться к конкретной ячейке или столбцу (действиями из группы "Таблицы"). Если параметр выключен, то в логе будет указано "Столбцов: 3; строк: 3", названия столбцов в заголовке будут These headings cannot be accessed as a row of data to read, but you can use the column names to access a specific cell or column (actions from the "Tables" group). If the option is off, the log will show "Columns: 3; rows: 3", the column names in the header will be "1", "2" и and "3".

...

For the "Remove duplicate header" checkbox

При значении "When true", в заголовке табличного значения, которое действия возвращают как результат, к одинаковым названиям столбцов будут добавлены индексы. Нумерация начинается с 1. 
Пример №1:
В excel есть таблица:
image2024-1-16_16-18-52.pngImage Removed
При , the header of the tabular value that actions return as a result will have indices added to the same column names. The numbering starts from 1.  
Example #1:
There is a table in Excel:
image2024-1-16_16-18-52.pngImage Added
With "Remove duplicate header" = true, и and "Heading" = True, действие the "Взять таблицу" вернет таблицу из 10 строк и 4х столбцов. Названия столбцов этой таблицы будут "№Get table" action will return a table of 10 rows and 4 columns. The column names of this table will be "No.", "Title", "Tests1", "Tests2".
Пример №2Example #2:
В excel есть таблицаThere is a table in excel:
image2024-1-16_16-20-53.png
При When "Remove duplicate header"   = true, и and "Heading" = True, действие the "Взять таблицу" вернет таблицу из 4х строк и 5 столбцов. Названия столбцов этой таблицы будутGet table" action will return a table of 4 rows and 5 columns. The column names of this table will be:

"Test31", "Test21", "Test22", "Test32", "Test1".
При значении "

If false", названия столбцов останутся прежними. Действия на net, которые возвращают\обрабатывают такие таблицы с задублированными названиями столбцов, будут падать с ошибкой, т.к. в net не может быть заголовка с одинаковыми названиями столбцов., the column names will remain the same. Actions on net that return/process such tables with duplicated column names will crash with an error, because net cannot have a header with the same column names.

For example, the source table has columns Например, в исходной таблице есть столбцы "Test1", "Test" и and "Test". Если добавлять индексы только к текущим дублям, то названия станут такими If we add indexes only to the current takes, the names will become "Test1", "Test1" и and "Test2", тi.е. в итоге появятся новые дубли с названием "Test1". Поэтому действие при переименовании конкретного столбца должно проверять, нет ли уже такого названия у другого столбца и при наличии таких совпадений проставлять у текущего столбца следующий по счету индекс. Т.е. в данном случае действие переименует столбцы как e. eventually there will be new takes with the name "Test1". Therefore, when renaming a particular column, the action should check if another column already has such a name and if there is such a match, the current column should have the next index. That is, in this case the action will rename the columns as "Test1", "Test2" и and "Test3".

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

Задача

Example of use

Task

There are 2 Excel documents Существует 2 Excel - документа "Test" и and "Test1". Необходимо взять таблицу из документа "Test" и вставить ее в документ "Test1" начиная с ячейки А3It is necessary to take a table from the "Test" document and paste it into the "Test1" document starting from cell A3.

image2024-1-16_16-23-31.png

Решение

Solution

Use the actions "OpenВоспользоваться действиями "Открыть", "Взять таблицуGet table", "Вставить таблицуInsert table", "СохранитьSave".   

Реализация

Implementation

  1. Assemble a robot scheme consisting of the actions: "OpenСобрать схему робота, состоящую из действий: "Открыть", "Взять таблицуGet table", "Вставить таблицуInsert table", "СохранитьSave". 


  2. Настроить параметры для действия  "Открыть". В поле "Путь к файлу" указать путь до требуемого Excel-файла. Проставить чекбокс Видимый = true для отображения действий робота на экранеConfigure parameters for the "Open" action. In the "File path" field, specify the path to the required Excel file. Check the Visible = true checkbox to display robot actions on the screen
    image2024-1-16_16-29-39.png
    Настроить параметры для действия "Взять таблицу". В поле "Контекст" указать контекст открытого документа, создать переменную типа "Таблица", в которую будут записаны данные и в поле "Результат" ее указать.  Остальные поля оставить пустыми, т.к необходимо забрать таблицу полностью. 
    image2024-1-16_16-30-33.pngImage Removed
    Настроить параметры для действия "Открыть". В поле "Путь к файлу" указать путь до требуемого Excel-файла, в который необходимо будет вставить таблицу. Проставить чекбокс Видимый = true для отображения действий робота на экране. 
    image2024-1-16_16-31-7.pngImage Removed
    Настроить параметры для действия "Вставить таблицу". В поле "Контекст" указать контекст открытого документа, в поле "Имя столбца начальной ячейки" указать значение "А", в поле "Строка начальной ячейки" указать значение "3". В поле "Таблица" указать ранее созданную переменную "Table" с данными. 
    image2024-1-16_16-31-28.pngImage Removed
    Настроить параметры для действия "Сохранить". В параметре "Контекст" указать контекст Excel-документа, в который будет вставлена таблица с данными. 
    image2024-1-16_16-31-44.pngImage Removed
  3. Запустить робота по кнопке "Старт" в верхней панели. 

Результат

Робот отработал успешно. 

image2024-1-16_16-34-40.pngImage Removed


  1. Set up parameters for the "Get table" action. In the "Context" field specify the context of the opened document, create a variable of the "Table" type to which the data will be written and specify it in the "Result" field.  Leave the other fields empty, because it is necessary to take the table completely. 
    image2024-1-16_16-30-33.pngImage Added

  2. Configure parameters for the "Open" action. In the "File path" field, specify the path to the required Excel file where the table should be inserted. Check the Visible = true checkbox to display robot actions on the screen. 
    image2024-1-16_16-31-7.pngImage Added

  3. Customize parameters for the "Insert table" action. In the "Context" field specify the context of the opened document, in the "Start cell column name" field specify the value "A", in the "Start cell row" field specify the value "3". In the "Table" field specify the previously created variable "Table" with data. 
    image2024-1-16_16-31-28.pngImage Added

  4. Customize parameters for the "Save" action. In the "Context" parameter specify the context of the Excel document where the table with data will be inserted. 
    image2024-1-16_16-31-44.pngImage Added

  5. Launch the robot using the "Start" button in the top panel. 

Result

The robot performed successfully. 

image2024-1-16_16-34-40.pngImage Added

A table starting in cell A3 has been inserted into the document "Test1"В документ "Test1" вставлена таблица начиная с ячейки А3

image2024-1-16_16-35-8.png