08-05-2009, 10:30 AM
Hi Maruti,
Foollowign is the code to extract values from Excel sheet. It may help you.
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