Get table from CSV Version 7 (Net)

Action group: Tables


Description

This action is designed to read a table from the CSV format.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
FilePath to the CSV file.Robin.FilePath
Yes
EncodingSource file encoding.Robin.String
Yes
Line separatorLine separator in the source file. Default is rnRobin.String
No
Column separatorCharacter used to separate the columns in the source file. The default is «;»Robin.String
No
HeadingIf the value is «true», the table header will be inserted into the document along with its rows.Robin.BooleantrueNo
Remove duplicate headerIf the value is «true», indexes will be added to the same column names in the header of the resulting table. Numbering starts from 1.Robin.BooleantrueNo
Results
ResultThe resulting table.Robin.DataTable

Special conditions of use

For the "Heading" parameter: 

When "true", the action will keep the first row of the original table in the header of the returned tabular value, i.e. it will not be the row with the table contents.
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.


For the "Remove duplicate header" checkbox:

When "true", indexes will be added to identical column names in the header of the tabular value that actions return as a result. The numbering starts from 1.

If the value is "false", 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 identical column names.


Example of a table in CSV format:

Example of use 

Task

There is a table in CSV format. You need to get it into a variable of type "Table". 

Solution

Use "Get table from CSV".

Implementation

  1. Move the "Get table from CSV" action to the workspace:
  2. Set the parameters for this action: 

3. Start the robot using the "Start" button in the top panel. 

Result

The program robot completed successfully. 

The table from CSV is retrieved.

 

Additionally: the result of action processing when the "Heading" checkbox is checked.


 

  • Нет меток