View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.vba
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Getting Table data from HTML page

Hi Mustafa,

Here is simple macro to get data from the web, using web query, and saving
the results in a worksheet

sURL = "http://support.microsoft.com/default.aspx"
sParam = "?scid=fh;en-gb;KBHOWTO"
sFullURL = sURL & sParam
With Sheets("Sheet1").QueryTables.Add(Connection:="URL; " & sFullURL , _
Destination:=Sheets("Sheet1").Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Mustafa Ahmad Malik" wrote in message
...
Hi,
I'm interested to collect table data from HTML page. Is it possible using
excel-vba. If yes, how this can be done.

Thanks,
Mustafa