Get Total Row Count

This is a pre-built Action located under the @Excel Element. The functionality of this Action in Avo Assure is to fetch the total number of rows present in the Excel file. The result of this operation is stored in a dynamic variable for further use during test execution.

Note: While retrieving the total row count of the specified Excel sheet, Avo Assure considers the header as the first row.

Syntax

Input Value: <column number(optional)>

Argument
Description

<column number> (Optional)

Provide the column number based on the requirement.

  • When you do not provide a column number, the action counts all rows in the Excel sheet.

  • When you provide a column number, the action counts only the rows that contain data in that column.

Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)

Argument
Description

<Dynamic Variable> (Required)

This dynamic variable stores the total numbers of rows of the Excel sheet.

<Dynamic Variable> (Optional)

This dynamic variable stores the status as True or False.

Example 1: Retrieving Total Row Count without Specifying a Column

In this example, we explain how to retrieve the total number of rows from an Excel sheet when no specific column number is provided.

  • Action: Get Total Row Count

  • Input Value: N/A

    • This action does not require any input value. It automatically counts all the rows present in the active Excel sheet configured earlier through the Set Path for File action.

  • Output Value: {Row Count}

    • The total number of rows containing data (e.g., 9) is stored in the {Row Count} dynamic variable.

    • If a second output variable is provided, the action returns the status as True/False:

      • True: If the total row count is retrieved successfully.

      • False: If the total row count is not retrieved successfully.

  • Logical Explanation: The Get Total Row Count action retrieves the total number of rows available in the Excel sheet. When no column number is specified, Avo Assure counts all rows that contain data in any cell. The retrieved row count is stored in the {Row Count} variable (e.g., 9).

Example 2: Retrieving Total Row Count Based on Column Number

In this example, we explain how to retrieve the total number of rows from an Excel sheet based on a specified column number.

  • Action: Get Total Row Count

  • Input Value: 2

    • The column number, 2, specifies that the row count should consider only those rows where column 2 contains data in the Excel sheet configured earlier through the Set Path for File action.

    • This allows Avo Assure to count rows selectively based on data availability in a specific column.

  • Output Value: {Row Count}

    • The total number row containing data (e.g., 11) is stored in the {Row Count} dynamic variable.

    • If a second output variable is provided, the action returns the status as True/False:

      • True: If the total row count is retrieved successfully.

      • False: If the total row count is not retrieved successfully.

  • Logical Explanation: The Get Total Row Count action takes the value from the Input Value column 2 and retrieves the total number of rows containing data in 2nd column of the Excel sheet. The resulting row count is stored in the {Row Count} variable (e.g., 11).

Last updated

Was this helpful?