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?
Answer Posted / 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 View All Answers
What are the automation metrice in your project?
How to analyzing the checpoint results?
What is parameter in qtp?
What is the difference between local and shared object repository in qtp?
What are the advantages of qtp?
what are all the fileds present in object repository?
who QTP recognizes the object stored in object repository?
terminal services client
What is the difference between per-action and shared?
In qtp, how you can exit for loop?
Explain advantages and disadvantages kdf?
When I click on a link in web page.Link should open in new window.can anyone please let me know the script for this ---Koti
Give the syntax to load function at run time.
what is description object?
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...