Consulting

Results 1 to 2 of 2

Thread: Solved: Confusion with Jet 4.0 "HTML Import"

  1. #1
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location

    Solved: Confusion with Jet 4.0 "HTML Import"

    I perform several HTTP queries on web pages to local files then use the Jet 4.0 Provider to enumerate tables, then persist the ones I need as ADO xml tables. However [as an example] consider http://www.tsp.gov/rates/returns-tsp.html (html is attached). I can perform a web-query on table "4" and obtain the rate table. When I use Jet 4.0

    cHTM = "c:\test\returns.htm"
    cConn="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
    cHTM & '; Extended Properties="HTML Import; HDR=Yes";'
    oConn=CreateObject("ADODB.Connection")
    oConn.Open cConn 
    oRS = oConn.OpenSchema(20) ' adSchemaTables = 20
    It errors with "External Table is not in the expected format". I assumed Excel web-query and ADO used a similar underlying logic to obtain data from HTML tables. I have not found any explicit references that indicate Jet 4.0 Html Import does not handle nested tables. So why does this particular page generate the error?
    TIA
    Stan

  2. #2
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    a bit kludgy, but if I replace TBODY with TABLE in the htm file Jet and ADO work fine.

Posting Permissions

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