07-05-2011, 08:31 PM
Assuming you have created the column header (column,row,DocView)in an empty excel file,
Code:
Set objExcel = createobject("Excel.Application")
objExcel.Visible=True
objExcel.Workbooks.Add
Set TableObj = Browser("Wisdom").Page("Wisdom IA_2").Frame("parent").WebTable("Select All")
RowCount = TableObj.RowCount
msgbox RowCount
For i = 1 to RowCount
[b]objExcel.Cells(i+1, 1).Value = i[/b]
ColCount = TableObj.ColumnCount(i)
'msgbox ColCount
For j = 1 to ColCount
[b]objExcel.Cells(i+1, 2).Value = j[/b]
ChildCount = TableObj.ChildItemCount(i, j, "Link")
If ChildCount > 0 Then
InnerHtml = TableObj.Object.rows(i-1).Cells(j-1).innerHTML
For k = 0 to ChildCount - 1
Set LinkObj = TableObj.ChildItem(i, j, "Link", k)
LinkName = LinkObj.GetROProperty("text")
[b]objExcel.Cells(i+1, 3).Value = TableObj.getcelldata(i,j)[/b]
Next
End If
Next
Next