Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 390
Default Import HTML table

Can anyone show me some code to import an HTML table from a webpage. I
curious if it is possible to import the data between <TABLE tags in the html
source.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Import HTML table

how about using a Web Query:

ActiveWorkbook.Worksheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://finance.yahoo.com/actives?e=o",
Destination:=Range("A1"))
.Name = "actives?e=o"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "3"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With

Look at help on "WebTables" and .WebSelectionType = xlSpecifiedTables


http://office.microsoft.com/en-us/as...450851033.aspx

http://www.vertex42.com/News/excel-web-query.html

--
Regards,
Tom Ogilvy


"Bill" wrote in message
...
Can anyone show me some code to import an HTML table from a webpage. I
curious if it is possible to import the data between <TABLE tags in the

html
source.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import HTML Table JimJx Setting up and Configuration of Excel 0 July 23rd 07 01:44 PM
HTML Import Errors [email protected] Excel Discussion (Misc queries) 1 February 15th 07 12:56 AM
html import errors wwoody Excel Discussion (Misc queries) 1 May 3rd 06 11:06 PM
Import External Data Non-HTML Table Jay637 Excel Discussion (Misc queries) 0 March 9th 06 04:37 PM
HTML import problem mjack003[_17_] Excel Programming 0 December 21st 05 09:52 AM


All times are GMT +1. The time now is 01:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"