Link to home
Create AccountLog in
Avatar of newparadigmz
newparadigmzFlag for United States of America

asked on

Excel VBA extract table from website

Very simply, how do I extract this table, using Excel VBA, into Excel?
Avatar of FamousMortimer
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of newparadigmz


getting an "Invalid procedure call or argument" error message.

Does this work for you?

Am I missing a library reference?
try commenting out .CommandType = 0 and see if that works
well, that was easy, thanks!

Can I ask, on the most basic level, what is this doing, going in and looking for a table and just grabbing it? What if there were 2 tables on the page?

Basically, the '.WebSelectionType' is where it specifies which table to retrieve.  You can set it to 'xlSpecifiedTables' then specify which tables using the '.WebTables' property.

Here is a an example