Search here for all the info you want in this Blog

How to export the entire webtable from the webpage into Excelsheet


Here is an example to copy all the content of a webtable to excel sheet.


dim xl
set xl=createobject("Excel.Application")
xl.workbooks.open "c:/book1.xls"
set nsheet=xl.sheets.item(1)
row=Browser("browser").page("page").webtable
("table").getroproperty("rows")
cols=Browser("browser").page("page").webtable
("table").getroproperty("cols")
for i=0 to row-1
   for j=0 to col-1
    val=Browser("browser").page("page").webtable   
("table").getcelldata(i,j)
     nsheet.cells(i,j)=val
     next
next

No comments:

Post a Comment