Definition and Usage
Returns the number of rows in the used range of the worksheet, including any empty rows in between. This command helps you determine the total number of rows containing data in an Excel worksheet, which is useful for processing data or performing calculations on the entire dataset.
Parameter Values
Input parameters
Parameter | Description | Required | Options / Notes |
Excel instance | Please select an Excel instance (created via the "Launch Excel" or "Get active Excel worksheet" command) to identify the instance to operate on. | Yes | Must reference a valid Excel instance |
Worksheet name | Specify the worksheet name (leave blank for the active worksheet) | No | If left blank, the currently active worksheet will be used |
Error handling
Parameter Name | Description |
Throw error & stop | When an error occurs, the action will trigger an error and stop the execution of the entire app. |
Retry command | If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process. |
Ignore error & continue | When an error occurs, the action will be ignored, and the workflow will continue without interruption. |
Variables produced
This command produces a numeric variable that stores the count of rows in the specified worksheet's used range, as defined in the "Store row count into" parameter.
Using Variables in Conditions
You can use the output variable (row count) in subsequent actions by referencing it with the variable name you specified. This value can be used in conditions, loops, or other Excel operations where you need to know the number of rows in your data range.
Notes
Before using this command, ensure that a valid Excel instance has been created using either the "Launch Excel" or "Get active Excel worksheet" command.
The row count includes all rows within the used range, even if some rows within that range are empty.
The count represents the number of rows in the used range, not the total number of rows in the worksheet.
This command only counts rows that are within the used range of the worksheet, which is the area that contains data or formatting.