10-07-2010, 11:40 AM
(This post was last modified: 10-07-2010, 12:23 PM by KavitaPriyaCR.)
Hi
Try this, below script is the edited one, will give you the perfect output xls file
Try this, below script is the edited one, will give you the perfect output xls file
Code:
Set desc=Description.Create()
desc("micclass").value="WebTable"
desc("text").Value="200220032004Capital structure analysis.*"
Set WebEdits=Browser("Title:=Financial Analysis").Page("Title:=Financial Analysis").ChildObjects(desc)
cCount=WebEdits(0).getROProperty("cols")
rCount=WebEdits(0).getROProperty("rows")
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook= objExcel.Workbooks.Open("C:\Documents and Settings\Administrator\Desktop\ForumExcel.xls")
Set objSheet=objExcel.Sheets("Sheet1")
For i=1 To rCount
For j=1 To cCount
data=WebEdits(0).GetCellData(i,j)
If (Instr(data,"analysis (%)") <> 0 OR Instr(data,"flow (%)") <> 0)Then
objsheet.Cells(i,j).Value=data
j=cCount
else
objsheet.Cells(i,j).Value=data
End If
Next
Next
objWorkbook.save
objWorkbook.close
objExcel.Quit
set objExcel=nothing