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 purpose of a gui spy?

945


What is a checkpoint and what are different types of checkpoints?

951


How do you handle pop-up exceptions?

862


Explain the purpose of gui map configuration?

854


Name the different types of checkpoints?

829


What is the purpose of regexp_label property?

812


What are data driven tests?

866


Explain the purpose of gui spy?

843


For my web Application I am recording website by WR. but the fuctions are displaying normal recorded fun. such as set_window...etc. eventhough i selected web add-in at start up WR. how to use web functions? such as web_link_click.... pls. guide

2025


What different actions are performed by find and show button?

899


Dear all i am new to testing my company using vb.net and we are developing web based application. How i can test those application with winrunner if any one have some good tutorial or link kindly provide thanks u.

1812


What is the disadvantage of loading the GUI maps through start up scripts?

835


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

1847


Explain the use of test director software?

843


How to integrate automated scripts from testdirector to winrunner scripts?

926