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

Ключ

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

...

Insert table Version 1 (Net)

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

Описание

Действие вставляет готовую таблицу в указанную область Word-документа.

Указывается Word-документ, таблица для вставки и место вставки. Также есть возможность перенести таблицу с заголовком или без.

Иконка

Image Removed

Параметры

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

  • Контекст - контекст открытого Word-документа. Открыть Word-документ можно с помощью с действия "Открыть" (группа "Word"). 
  • Таблица - таблица, которую необходимо вставить.
  • С заголовком - параметр, с помощью которого можно вставить таблицу с заголовком или без.
  • Место вставки - место в документе, куда необходимо вставить таблицу. Доступно 3 варианта: Начало документа, Конец документа, После закладки.
  • Название закладки - название закладки, после которой необходимо вставить таблицу. Параметр учитывается, если заполнен параметр "Место вставки" - После закладки.

Настройки

...

Description

The action inserts the completed table into the specified area of the Word-document

The Word-document, the table for insertion and the insertion location are specified. It is also possible to move a table with or without a header

Action icon

Image Added

Parameters

Input parameters

ParameterDescription
ContextThe context of an open Word-document. You can open a Word-document using the "Open document" action ("Word" action group).
TableTable to insert.
HeadingParameter that helps to insert the table with or without the heading.
Place of additionA place in the document where to insert the table. There are three options available: Beginning, End, After bookmark. 
Bookmark nameA name of the bookmark after which the table is to be inserted. The parameter is taken into account if the "Place of addition" parameter is set to "After bookmark".

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextThe Word document instance to which the action will be applied.Robin.WordWord contextYes
TableThe table to be inserted into the Word document.Robin.DataTable
Yes
HeadingIf the value is «true», the table header will be inserted into the document along with its rows

Свойство

Описание

Тип

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

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

заполнения поля

Параметры

Контекст

Экземпляр Word-документа, к которому будет применено действие.

Robin.Word

Контекст Word-документа

Да

Таблица

Таблица, которая будет вставлена в Word-документ.

Robin.DataTable

table1

Да

С заголовкомЕсли значение "true", заголовок таблицы будет вставлен в документ вместе с его строками
.Robin.Booleantrue
НетМесто вставки

Место в документе, куда будет вставлена таблица.

Элементы выпадающего списка:

  • Начало документа
  • Конец документа
  • После закладки
No
Place of additionThe location in the document where the table will be inserted.Robin.String
После закладки

Yes
ДаНазвание закладкиНазвание закладки, после которой будет вставлена таблица
Bookmark nameThe name of the bookmark after which the table will be inserted.Robin.String
Закладка1Нет

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

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

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

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

Действие не работает с заблокированными полями в защищенных документах. В этом случае робот выдаст ошибку.

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

Задача

 Имеется Word-документ. Необходимо вставить таблицу после закладки.

Документ:

Image Removed

Решение

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

Реализация

  1. Собрать схему робота, состоящую из действий: 
    Image Removed
  2. Настроить параметры действия "Открыть". В поле "Путь к файлу" указать путь к файлу Word-документа. В поле "Видимый" проставить чекбокс = true.
    Image Removed
  3. Настроить параметры действия "Вставить таблицу". В поле "Контекст" указать экземпляр Word-документа, в котором необходимо вставить таблицу. В поле "Таблица" указать таблицу для вставки. В поле "С заголовком" указать чекбокс = true. В поле "Место добавления" указать "После закладки". В поле "Название закладки" указать имя существующей закладки после которой будет вставлена таблица.
    Image Removed
  4. Настроить параметры действия "Сохранить как". В поле "Контекст" указать экземпляр Word-документа, который нужно сохранить. 
    Image Removed
  5. Настроить параметры действия "Закрыть". В поле "Контекст" указать экземпляр Word-документа, который нужно закрыть.
    Image Removed
  6. Запустить робота по кнопке "Старт" в верхней панели. 

Результат

Программный робот отработал успешно. Изображение вставилось в указанное место.


No

Special conditions of use

If you have selected a place of addition after the bookmark, then you must specify the name of the bookmark. Otherwise, the robot will return an error.

If the bookmark name is specified, but another place of addition is selected, the action will ignore the bookmark name parameter.

If the place of addition after the bookmark is selected, but there are no bookmarks in the document, the robot will return an error.

The action does not work with locked fields in protected documents. In this case, the robot will return an error.

Example of use

Task

You have a Word-document. Insert a table after the bookmark.

Document:

Image Added

Solution

Use the "Open document", "Insert table", "Save as", "Close document" actions.

Implementation

  1. Assemble a robot scheme with the actions.
    Image Added
  2. Set the "Open document" action parameters. In the "Path to file" field specify the path to the Word-document file. In the "Visible" field check the checkbox = true.
    Image Added
  3. Set the "Insert table" action parameters. In the "Context" field specify the Word-document instance where the table is to be inserted. In the "Table" field specify the table for insertion. In the "Heading" field check the checkbox = true. In the "Place of addition" field specify "After bookmark". In the "Bookmark name" specify the name of the existing bookmark after which the table will be inserted.
    Image Added
  4. Set the "Save as" action parameters. In the "Context field" specify the Word-document instance to be saved.
    Image Added
  5. Set the "Close document" action parameters. In the "Context" field specify the Word-document instance to be closed.
    Image Added
  6. Click "Start" in the top panel to start the robot.

Result

The program robot completed successfully. The table was inserted in the desired place.

Word-documentWord-документ: