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

Ключ

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

...

Action returns cell values from the specified page area in the form of a table.

Icon

Parameters

Input parameters  

...

Settings of parameters

Output parameters

Result Variable to which the range data will be written

Settings

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

Context excel

Yes

Start cell column name

The column name of the initial cell (the beginning of the range) from which the area will be set. If the field is not filled in, the value from the "Index cell column name" field is taken.

String


No

Index cell column name

Column index of the initial cell (beginning of the range) from which the area will be set. If the field is not filled in, the boundary of the used area is taken.

Numeric


No

Start cell row

The row of the initial cell (beginning of the range) from which the area will be set. If the field is not filled in, the boundary of the used area is taken.

Numeric


No

End cell column name

The column name of the end cell (end of range) to which the area to be copied will be set. If the field is not filled in, the value from the "End cell column index" field is taken.

String


No

End cell column index

The column index of the end cell (end of range) to which the area to be copied will be set. If the field is not filled in, the boundary of the used area is taken.

Numeric


No

End cell row

The row of the end cell (end of the range) to which the area to be copied will be set. If the field is not filled in, the boundary of the used area is taken.

Numeric


No

Skip hidden

A boolean variable. If True, only visible rows and columns are returned, otherwise all rows and columns are returned.

Boolean

true

No

Heading

If true, the first row of the table will be highlighted separately as a header and will not be included in the table content rows.

Boolean

true

No

Remove duplicate header

If the value is "true", indexes will be added to the same column names in the header of the resulting table. The numbering starts from 1.

Boolean

true

No

Results

Result

The variable into which the range data will be written

Table



...

From excel we get the table:

image2024-1-16_16-19-12.pngImage RemovedImage Added

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". 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".

...

When true, 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 RemovedImage Added
With "Remove duplicate header" = true, and "Heading" = True, the "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".
Example #2:
There is a table in excel:
image2024-1-16_16-20-53.pngImage RemovedImage Added
When "Remove duplicate header" = true, and "Heading" = True, the "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".

...

There are 2 Excel documents "Test" and "Test1". It 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.pngImage RemovedImage Added

Solution

Use the actions "Open", "Get table", "Insert table", "Save".  

...

  1. Assemble a robot scheme consisting of the actions: "Open", "Get table", "Insert table", "Save". 


  2. 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.pngImage RemovedImage Added

  3. 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 RemovedImage Added

  4. 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 RemovedImage Added

  5. 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 RemovedImage Added

  6. 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 RemovedImage Added

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

...

The program robot completed successfully. 

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

A table starting in cell A3 has been inserted into the document "Test1". 

image2024-1-16_16-35-8.pngImage RemovedImage Added