UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Read Table From Webpage, Access 2002    
 
   
SebastianC
post Oct 3 2016, 03:07 PM
Post#1



Posts: 5
Joined: 10-September 15



Hello

I try to read an html table form http://www.mfinante.ro/infocodfiscal.html?cod=8915831. It is a public governmental site with information about registered firms. It is the main table which I want to import in my app.
Basically one can find information about registered firms based on a fiscal number.
I'm using 'Internet Data Transfer Library' from http://access.mvps.org/access/modules/mdl0037.htm.
My approach was to save the webpage and then parse to the html file and extract the information. But when I save the page the table data doesn't get saved.
I am using Access XP on Windows 10.
Can anyone help me with an advice?
Or is there another way to copy data from that table?

Many thanks for any advice!

Sebastian C.
Go to the top of the page
 
theDBguy
post Oct 3 2016, 03:17 PM
Post#2


Access Wiki and Forums Moderator
Posts: 71,232
Joined: 19-June 07
From: SunnySandyEggo


Hi Sebastian,

Welcome to UtterAccess!
welcome2UA.gif

I could be wrong but it appears the table might be some sort of an Ajax Script, so a simple web scraping approach won't work on it. You might consider contacting the agency who owns the website and ask them if they provide a web service you can connect to using Access to retrieve the same information.

Just my 2 cents...
Go to the top of the page
 
jleach
post Oct 3 2016, 10:15 PM
Post#3


UtterAccess Editor
Posts: 9,812
Joined: 7-December 09
From: Staten Island, NY, USA


I agree... I took a quick poke around and came to the same conclusion.

In light of that, you'll likely need some sort of browser automation to get this rather than trying to scrape the page content itself. You might be able to use the Web Browser Control ("native" in Access 2007+ I believe, though that's really just a wrapper around the ActiveX control that's available for previous versions). By letting a browser render and adjust the DOM accordingly, you should then be able to tap into the "final" state of the DOM to get what you need.

With an instance of the WebBrowserControl (which is essentially an embedded version of IE) and the ability to read the DOM, you should be able to pull it off, though it's probably not going to be a lot of fun.

Another avenue might be that of a "more external" browser automation approach as described here: http://www.UtterAccess.com/wiki/index.php/..._Object_Library

Cheers,
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    16th December 2017 - 01:32 PM