Count columns Version 1 (Net)

Action group: Tables


Description

The action returns the number of columns for the entire table, not for a specific row (similar to the Get Number of Rows action).  If "Skip empty columns" is enabled, only if the entire column is empty, it will not be counted.

Action icon


Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Data tableTable where to count the columns.Robin.DataTable
Yes
Skip emptyIf the value is «true», the action will only count the filled columns.Robin.BooleantrueNo
Results
ResultNumber of columns in the table.Robin.Numeric

Special conditions of use

None.

Example of use 

Task

There is a table.

It is necessary to calculate the number of columns in a given table. Output the result to the log. 

Solution

Use "Get table from CSV", "Count columns",  "Message in log" actions.

Implementation

  1. Let's assemble the following robot scheme consisting of actions:

    1. Get table from csv;
    2. Count columns;
    3. Message in log.

  2. Set the action parameters
    a. Set the parameters for the "Get table from CSV" action :

    b. Set the "Table" parameter for the "Count columns" action:

    c. Set the parameter for the "Message in log" action.
  3. Start the robot using the "Start" button in the top panel. 

Result

The program robot completed successfully. 

The number 3 is printed in the log, which corresponds to 3 columns in the table. 

 

  • Нет меток