CSV Row Count Command: csvRowCount
The csvRowCount command under the File Handler function is used to retrieve the number of rows present in a specified CSV file.
Example: You have a sales data file in CSV format, and you want to determine the number of rows.
Steps to Configure:
- Select Set a Variable from the Action dropdown.
- Enter a variable name in the Element Key field (e.g., RowCount). This variable will store the number of rows.
- Click on Form to open the configuration window.
- Select Functions from the dropdown, then choose File handler Function.
- In the Cmd field, select csvRowCount.
- Provide the following parameter:
- file: Path to the CSV file (e.g., C:/Data/InputData.csv).
- Click Save.


Outcome on execution:
- The command successfully reads the specified CSV file and returns the number of rows present (including the header row).
- The result is stored in the variable defined in the Element Key.
- This variable can be used in later steps of your automation process to reference the stored information using the syntax ${VariableName} (e.g., ${RowCount}).