+ Reply to Thread
Results 1 to 2 of 2

Import HTML table

  1. #1
    Bill
    Guest

    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. #2
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1