Get number of rows Version 2 (Python)
Action group: Office
Description
Action returns the number of rows of the specified column
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Context | Action context for ods/xlsx document | Robin.OpenSheetD oc | Yes | |
Column | The name of the column whose row count is to be retrieved. Only those rows that are included in the used area are taken into account when counting | Robin.String | Yes | |
Skip empty cells | Count rows only with filled cells in the specified column | Robin.Boolean | true | No |
Results | ||||
Result | Number of rows in the specified column | Robin.Numeric |
Special conditions of use
None.
Example of use
Task
There is a file Book1.xlsx, I need to get the number of filled rows in column A, save and close the document.
Solution
Use the actions "Open", "Get number of rows", "Save", "Close".
Implementation
- Move the "Open" action to the workspace and set its parameters
In the "Path to file" field specify the path to the file Book1.xlsx - Move the "Get number of rows" action to the workspace and fill in its parameters
In the "Context" field, specify the context created in step 1.
In the "Column" field specify the value = A.
In the "Skip empty cells" field specify a check mark.
In the "Result" field specify the variable "Number", having created it in advance. - Move the "Save" action to the workspace and set its parameter.
In the "Context" field specify the context of the opened document. - Move the "Close" action to the workspace and set its parameter.
- Launch the robot using the "Start" button in the top panel.
Result
The program robot completed successfully.
The number of filled rows of column A is successfully written to the variable "Number".
The file is saved and closed.
Обзор
Инструменты контента