Micro Focus QTP (UFT) Forums
Parameterise the Cell coordinates for a Swf Table object - 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: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Parameterise the Cell coordinates for a Swf Table object (/Thread-Parameterise-the-Cell-coordinates-for-a-Swf-Table-object)



Parameterise the Cell coordinates for a Swf Table object - neerukonda - 05-07-2009

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


RE: Parameterise the Cell coordinates for a Swf Table object - savita.kale - 08-05-2009

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