Link to home
Start Free TrialLog in
Avatar of John Carney
John CarneyFlag for United States of America

asked on

Identifying a web table in a VBA web query

I need to extract data from a table on a web page but i don't know what to call it. I inherited a workbook which does this for another site and identifies the table as "1". Please take a look at this page and let me know if possible what to call the Activity Log table (about halfway down the page). Ideally I want to retrieve the data under PAST FLIGHTS.

"http://flightaware.com/live/flight/A6ETA"

.WebSelectionType = xlSpecifiedTables
.WebTables = "1"

Open in new window


Thanks!

John
Avatar of Qlemo
Qlemo
Flag of Germany image

What I usually do as a quick test is to create a new web query with the URL, and then see if there is a yellow square with an error displayed for the corresponding table. If so, Excel is able to detect the table.
Problem is, that it is not a web table.
You'll have to load the page and search the DOM for <div class="flightPageDataTable">

/gustav
SOLUTION
Avatar of Neil Fleming
Neil Fleming
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I absolutley agree. Certainly any XML API is to be preferred over scraping HTML ...
Avatar of John Carney

ASKER

Thanks for all your help! So, how do you make an XML API in Excel with VBA?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- Qlemo (https:#a42375856)
-- Neil Fleming (https:#a42373316)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

broomee9
Experts-Exchange Cleanup Volunteer