Forum Discussion

Sherry's avatar
13 years ago

help! how to get total row count in Excel File datasource?

hi,

I need some help here, I need to get the total row count in a Excel File which is used as DataSource. Does anyone know hot to do that?


Thanks,
Sherry
  • To get the total number of rows in the Excel.

    def rowCount = testRunner.testCase.getTestStepByName('DataSource').rowCount;

    or

    def rowCount =testRunner.testCase.testSteps["DataSource"].rowCount;

     

    Note: Assuming that DataSource is the name of the Step.

     

  • georgetjose's avatar
    georgetjose
    Occasional Visitor

    To get the total number of rows in the Excel.

    def rowCount = testRunner.testCase.getTestStepByName('DataSource').rowCount;

    or

    def rowCount =testRunner.testCase.testSteps["DataSource"].rowCount;

     

    Note: Assuming that DataSource is the name of the Step.