Get number of columns Version 1 (.Net)

Action group: Excel 


Description

The action gets the number of columns in the table. Columns within the used context range are counted. If a row specified is outside the used context range, the action returns an empty result.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextAction context for working with an Excel documentRobin.ExcelExcel contextYes
Row indexThe index of the row whose number of columns you want to get.Robin.Numeric
Yes
Skip hidden columnsIf value is «true», the action will only read the visible columns.Robin.BooleantrueNo
Skip empty columnsIf the value is «true», the action will only read the filled columns.Robin.BooleantrueNo
Results
ResultThe number of columns from the specified row.Robin.Numeric

Special conditions of use

The robot will return an error if the negative row index or 0 is entered.

Example of use

Task

There is an Excel-document with a table.

Get the number of filled columns in row 1.

Solution

Use the "Open", "Get number of columns", "Close" actions.

Implementation

  1. Assemble a robot scheme with the actions.                                                                                                                                              
  2. Set the "Open" action parameters.                                                                                                                                                              
  3. Set the "Get number of columns" action parameters.                                                                                                                                    
  4. Set the "Save" action parameters.
  5. Set the "Close" action parameters.                                                                                                                                                                        
  6. Click "Start" and see the result.

Result

The number of columns is counted.

  • Нет меток