06-29-2011, 03:22 PM
Hello Lorena,
Just did some little changes in your script. When you know that you want the data of 5th column then no need to put an extra for loop for column
Regards,
Parminder
Just did some little changes in your script. When you know that you want the data of 5th column then no need to put an extra for loop for column
Code:
Set TableObj = Browser("Wisdom").Page("Wisdom IA_2").Frame("parent").WebTable("Select All")
RowCount= TableObj.RowCount
rNumber = 1
For r = 1 to RowCount
If r <> 2 Then
ChildCountPage=TableObj.ChildItemCount(r, 5, "WebElement")
If ChildCountPage > 0 Then
For k = 0 to ChildCountPage - 1 ' no need to run the index loop also as you can debug on which index number the pages are coming and provide that index no in childitem method
rNumber = rNumber +1
NumPages = TableObj.ChildItem(r,5, "WebElement", k).GetROProperty("innertext")
If NumPages<>"" Then
objExcel.Cells(rNumber, 6).Value = NumPages
Exit For
End If
Next
End If
End If
Next
Regards,
Parminder