View Full Version : Solved: Confusion with Jet 4.0 "HTML Import"

07-09-2006, 06:52 AM
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.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?:dunno

07-10-2006, 08:28 AM
a bit kludgy, but if I replace TBODY with TABLE in the htm file Jet and ADO work fine. :doh: