Micro Focus QTP (UFT) Forums

Full Version: Parameterise the Cell coordinates for a Swf Table object
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All

I am in need of help for parameterising the cell coordinates. Instead of the coordinated I would like to read by name in the cell.

In breif the actions on my application are 1. double click on a particular security(cell data) to open that security properties window.

I am looking to pass the name of the security from the external data file say excel sheet.

Much more from attachment.

Any help is grately appreciated.

Many thnaks in advance
maruti
Hi Maruti,

Foollowign is the code to extract values from Excel sheet. It may help you.

Code:
Dim sFileLocation

On Error Resume Next
SystemUtil.CloseProcessByName "Excel.Exe"

sFileLocation = "C:\Input.xls"
sWorksheet = "InputData"

Set xlObj = CreateObject("Excel.Application")
xlObj.Visible = True

Set xlWorkBookObj = xlObj.Workbooks.Open(sFileLocation)
Set xlWorkSheetObj = xlWorkBookObj.Worksheets(sWorksheet)

'For 2 rows
For  i  =2 To 3
    sLiabilityValue = xlWorkSheetObj.Cells(i,1)
     SwfWindow("InvestmentManager - Automation").SwfWindow("Targeter - CDO Fund").SwfTable  ("preTradesGrid").ActivateCell sLiabilityValue
Next