Share via

Copy selected table from web page using VBA

Anonymous
2011-04-21T11:56:17+00:00

i need to copy a particular table from a web page. So far i can open the web page using ie object.

when i use query table to copy the table from the web page, i didnt work.

when i view the html page i could find out that the required table is the second table in the web page

can anybody help me to copy the required table in to the worksheet

i found somewhere the following code:

Dim Doc As HTMLDocument Set Doc = IE.document

but i dont know how to proceed further

pls help...

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2011-04-27T02:22:33+00:00

    Dear Don Guillett,

    actuallu its our intranet, you would not get access. actually we need to login.. thats why i want to use IE object.

    if i post the HTML code will you able to help?

    Thanks for your response..

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-04-27T02:17:27+00:00

    Dear Mike,

    Thanks for your support, but i would like to automate the process with VBA, if you could suggest something in addition to this...

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-04-21T14:23:24+00:00

    Can you post the url and the data you want. Perhaps an external query?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-04-21T12:47:00+00:00

    Hi,

    Excel has the functionality to import tables from the web without any need for VB code. Select the cell that you want to be top-left of your data then

    Data Tab|Get external data group|From Web

    You now have a popup where you can paste the address of the web page and click 'GO' to navigate to that page. If you then scroll to the table you want you can select and import it.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2011-04-21T12:45:03+00:00

    Either the URL of the page or what you get when you use View / Source would be helpful.

    Bernie

    Was this answer helpful?

    0 comments No comments