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 disadvantage of loading the GUI maps through start up scripts?

814


Write test scripts on a scenario where you have to transfer data from one table to another.

1818


What is parameterizing?

840


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

1876


plz give me code or steps for pop up exception. or can u tell me how to pause test run for defining handler function?

2354


How do you unload the GUI map?

909


soft key for virtual object wizard ?

2106


Explain the purpose of loading winrunner add-ins?

881


What is the purpose of different record methods?

906


Name the different types of checkpoints?

810


i would like to know the steps to write tsl exception and object exception with a simple example

1948


How do you suppress a regular expression?

1719


When would you use 'set_window' and when would you use 'win_activate'?

973


What are the Win Runner tools for functional testing?

2754


Explain the purpose of gui map configuration?

828