newparadigmz
asked on
Excel VBA extract table from website
Very simply, how do I extract this table, using Excel VBA, into Excel?
http://www.treasurydirect.gov/RI/OFNtebnd
http://www.treasurydirect.gov/RI/OFNtebnd
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try commenting out .CommandType = 0 and see if that works
ASKER
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?
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?
Thanks!
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
http://msdn.microsoft.com/en-us/library/office/aa215965(v=office.11).aspx
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
http://msdn.microsoft.com/en-us/library/office/aa215965(v=office.11).aspx
ASKER
Does this work for you?
Am I missing a library reference?