Suppose there is a link present somewhere in an excel sheet.
Find the link and click on it. How to write a script using
Excel application object in QTP?






Suppose there is a link present somewhere in an excel sheet. Find the link and click on it. How to..

Answer / anup muralidharan nair

'Assume the link present in excel that you want to click is
'www.google.co.in

set oxls = createobject("excel.application")
set obook = oxls.workbooks.open("D:\excel.xls")
set osheet = obook.worksheets("sheet1")

'Retrieve all the hyperlinks within the sheet
set ohyper = osheet.hyperlinks
for each hyp in ohyper
If hyp.name = "www.google.co.in" Then
hyp.follow
End If
next

'close the book and release the excel object
obook.close
set obook = nothing
set oxls = nothing

Is This Answer Correct ?    4 Yes 0 No

Post New Answer




More QTP Interview Questions

How to handle the exceptions using recovery scenario manager In QTP?

2 Answers  


What is the difference between Call to Action and Copy Action?

2 Answers   Satyam,


In a page i have N number of links at a time i would like to open those links by using QTP?how to do that?

2 Answers   Wipro,


How to get line numbers in your editor in expert view?

1 Answers  


can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks

0 Answers   iFocus,






What is load testing?

1 Answers   Crea,


How do you perform testing on web based application using qtp 9.2?

1 Answers  


After running scripts how you report results ,there is any specific report form

5 Answers   Novartis,


where exactly we can't do the automation testing. give some examples

2 Answers   Virtusa, Wipro,


breef description of batch testing ?

0 Answers   Wipro,


hai,i want to select an option from the right click pop up menu.but the qtp is not recognizing the right click pop up menu as a seperate object.can any one tell me the solution.

4 Answers   HP,


Diff b/w Test Design and Test case design? What is the Design Review's and Code Review's. When will you conduct tese reviews?

1 Answers  






Categories