[AccessD] HTML tables (was: xml tables)

Gustav Brock gustav at cactus.dk
Tue Jun 28 03:20:27 CDT 2022


Hi Stuart

Well, then this is one of those wonderful days where you are about learning something new.
Of course, the HTML table must be present in the file, and this must me static.

As an example:

1. Navigate to:
        https://www.norges-bank.no/tema/Statistikk/Valutakurser/

2. Right-click, Save as, Valutakurser.html
3. Open Access. Go to External data, New data source, From File, HTML document
4. In the wizard, select Valutakurser.html, select option 3:
	Create a link to the data source by creating a linked table
5. Press OK
6. Select at top: List HTML tables, then select the listed Valutakurser. Click Next
7. Mark: First row contains column headings. Click next
8. Click Advanced to set the decimal separator to comma
9. Set data type for the last two columns to Currency.
10. Click Next and Finish.

Enjoy your linked HTML table!

/gustav


-----Oprindelig meddelelse-----
Fra: AccessD <accessd-bounces+gustav=cactus.dk at databaseadvisors.com> På vegne af Stuart McLachlan
Sendt: 28. juni 2022 09:35
Til: Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Emne: Re: [AccessD] xml tables

That might work with an XML file, but we've since identifed that it's an HTML table in a web page, which is an entirely different thing. No way will Access identify the table. :(

On 28 Jun 2022 at 6:34, Gustav Brock via AccessD wrote:

> Hi John
> 
> As the very first, try to download that page to a file, and then - in 
> Access - create a link to this file. If in luck, Access will recognize 
> the table within the file. When linked, you can read and manipulate 
> the data as you would do for any other table.
> 
> I guess you have code to download a web page; if not, you can use one 
> of those found in my module internet.bas here:
> 
> https://github.com/GustavBrock/VBA.PictureUrl


More information about the AccessD mailing list