Read data from a table
t=gettabledata("x.com: Your Account","x.com: Your Account Page","MyTable")
Function gettabledata(strBrowser,strPage,strTable)
Set objPage = Browser("name:="&strBrowser).Page("title:="&strPage)
Set bishBoshTable = objPage.WebTable("html id:="&strTable)
rowcount = bishBoshTable.RowCount()
colcount = bishBoshTable.ColumnCount(2)
ReDim preserve strCell((rowcount-1)*colcount)
MsgBox("Row Count"&rowcount)
MsgBox("Col Count"&colcount)
k=0
For i = 2 to rowcount
For j= 1 to colcount
temp = bishBoshTable.GetCellData(i,j)
'if temp == empty, then continue
if(Not IsEmpty(temp)) Then
strCell(k) = temp
myString = myString + strCell(k)
k=k+1
End If
Next
Next
MsgBox(myString)
If Err.number > 0 Then
Err.Clear
End If
End Function
Function gettabledata(strBrowser,strPage,strTable)
Set objPage = Browser("name:="&strBrowser).Page("title:="&strPage)
Set bishBoshTable = objPage.WebTable("html id:="&strTable)
rowcount = bishBoshTable.RowCount()
colcount = bishBoshTable.ColumnCount(2)
ReDim preserve strCell((rowcount-1)*colcount)
MsgBox("Row Count"&rowcount)
MsgBox("Col Count"&colcount)
k=0
For i = 2 to rowcount
For j= 1 to colcount
temp = bishBoshTable.GetCellData(i,j)
'if temp == empty, then continue
if(Not IsEmpty(temp)) Then
strCell(k) = temp
myString = myString + strCell(k)
k=k+1
End If
Next
Next
MsgBox(myString)
If Err.number > 0 Then
Err.Clear
End If
End Function
1 Comments:
can u send me the script for launching a website in mozilla, safari......
Post a Comment
<< Home