If the data is stored in Excel sheet(2nd and 3rd), how to
access it for Data Driven test;
Ex: table = "c:\demo.xls"
How to access 2nd or 3rd sheet data id demo.xls flie.


Answer Posted / uday kumar. a

Dim excelObj,counter
counter=1
Set excelObj=createobject("Excel.application") 'Excel Object
Set wbObj=excelObj.workbooks.open("c:\demo.xls") 'work bood
object
Set wbs=excelObj.activeworkbook.worksheets("sheet2") 'work
sheet object
while not isempty(excelObj.cells(counter,1))
x=excelObj.cells(counter,1).value
msgbox(x)
counter=counter+1
wend

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the purpose of loading winrunner add-ins?

622


What is the purpose of regexp_label property?

582


what is qtp licence

1550


How do you find out which is the start up file in winrunner?

579


Explain the winrunner testing process?

609






What is the purpose of a gui spy?

688


What are the virtual objects and how do you learn them?

703


How to find the local host name using winrunner ?

1682


What is the purpose of set_window command?

698


How to read the third party controls in the application

1519


Could you anyone share me the path to download the automation tools which are having trial license version?

1679


How do you execute your tests from windows run command?

1441


How do u check FONTS in Login Window?

1698


What is toogle breakpoints? How does it differ from break points?

1781


How do you handle pop-up exceptions?

588