Forum Discussion

IRISQATeam's avatar
IRISQATeam
Contributor
12 years ago

Accessing a specified row in excel

I am new to TestComplete, I am able to access all the rows from the excel sheet by two ways



1. By Drive Method



  Driver = DDT.ExcelDriver("Excel File Path","Sheet Name")

  DDT.CurrentDriver.DriveMethod("Unit1.Test1")



2. By While Loop



   Driver = DDT.ExcelDriver("Excel File Path","Sheet Name")

 

    While Not DDT.CurrentDriver.EOF()

 

    Test1

    

    DDT.CurrentDriver.Next()

 

     WEnd



See attached screenshot, if I need to access only second row, how can I access a specific row?

1 Reply

  • aqAnt's avatar
    aqAnt
    SmartBear Alumni (Retired)

    Hello Zeeshan,


    You can iterate through records of your Excel sheet counting the current record's index or just compare the record's column value with the given one (e.g. BBB).