Insert table Version 13 (Net)
Action group: Excel
Description
The action writes data from a variable of type Table to the specified area of the active Excel workbook page.
Icon
Settings of parameters
Property | Description | Type | Example of filling in | Obligatory to fill in the field |
Parameters | ||||
Context | Action context for working with an Excel document | Excel instance | Excel context | Yes |
Start cell column name | The column name of the initial cell in which the top left cell of the table will be placed. If the field is not filled in, the value from the " Start cell column index" field is taken. | String | No | |
Start cell column index | The column index of the initial cell in which the top left cell of the table will be placed. If the field is not filled in, the border of the used area is taken. | Numeric | No | |
Start cell row | The cell row in which the top left cell of the table will be placed. | Numeric | No | |
Table | Variable of Table type with data | Table | Да | |
With heading | If true, the table header will be inserted into the document along with its rows. | Boolean | true | No |
Special conditions of use
For the With heading parameter:
- When set to "true", the action will write the header row of the source table into the document as the first row along with the rest of the main rows of the table. Example: the Studio specifies that the table has "Columns: 3; Rows: 2", when inserted into the document, 3 columns and 3 rows will appear filled in.
- If "false", the action will write only the main rows with the contents of the source table into the document. Example: in Studio, the table "Columns: 3; Rows: 2", when inserted into the document, 3 columns and 2 rows will be filled in.
Target table | Table after insertion without checkbox "With header" checked | Table after insertion with checkbox "With header" checked |
---|---|---|
Example of use
Task
There are 2 Excel documents "Test" and "Test1". You need to take a table from the "Test" document and paste it into the "Test1" document starting from cell A3.
Solution
Use the actions "Open", "Get table", " Insert table", "Save".
Implementation
- Assemble a robot scheme consisting of actions:
- Configure parameters for the "Open" action. In the "Path to file" field, specify the path to the required Excel file. Check the Open Visible = true checkbox to display robot actions on the screen.
- 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.
- Configure parameters for the "Open" action. In the "Path to file" field, specify the path to the required Excel file where the table should be inserted. Check the Open Visible = true checkbox to display robot actions on the screen.
- Set up parameters for the Insert Table action. In the "Context" field specify the context of the opened document, in the "Initial cell column name" field specify - A, in the " Start cell row" field - 3. In the "Table" field specify the previously created variable "Table" with data.
- 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.
- Launch the robot using the "Start" button in the top panel.
Result
The program robot completed successfully.

A table starting in cell A3 has been inserted into the document "Test1".
Additional
The result of inserting text into a file when the "With heading" checkbox of the "Insert table" action is selected.