Micro Focus QTP (UFT) Forums
To retrieve link from exported excel sheet and pass it into script - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: To retrieve link from exported excel sheet and pass it into script (/Thread-To-retrieve-link-from-exported-excel-sheet-and-pass-it-into-script)



To retrieve link from exported excel sheet and pass it into script - Nagu - 05-22-2009

Hi

In my application data will be changing so we are exporting the datas from application to excel and later we are using it has input so in this case scripts will not fail.

I was doing something like this:

Will export the links and later take the same links as input:

I used code something like this

Code:
Rowcount =osheet.usedrange.rows.count
msgbox Rowcount

For y=3 to Rowcount
    val=osheet.cells(y,11).Value
msgbox val
        If (val="LA") Then
            msgbox val
Obj.Link("innertext:="&val).Click
            Exit For
        End If        
Next


But its not working what might be wrong here..


Any help would be appreciated


RE: To retrieve link from exported excel sheet and pass it into script - supputuri - 07-13-2009

Hi Nagu,

i could not why you are uploading the links to excel from app and again using the same data.

If you don't mind pls provide your exact requirement (Test Step) that might make the question crystal clear.

1) Anyhow use "trim" while getting the data from excel sheet and from App.
2) Always a good code should have the else part for each if. Please make the chage accordingly.

Let me know ur req and any more help.

Thanks,
QTPKing