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

what is the difference between toggle checkpoint and checkpoint?

4262


Which are default codes winrunner generates when we start the application?

1598


How to break infinite loop?

669


When do you feel you need to modify the logical name?

647


you hae a inbox and got a mail how can you know it is there or not write script.

1567






What is the purpose of set_window command?

719


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

602


how can you explain your Real Estate Project in front of interviewer..? please step by step......

1158


What is the use of gui map?

615


What is the purpose of gui spy?

811


What is the purpose of different record methods?

664


How to integrate automated scripts from testdirector to winrunner scripts?

663


Explain the purpose of different record methods?

630


Where do you found that you can't use winrunner for automation?

1643


What all are the different databases winrunner can support?

1482