+ Reply to Thread
Results 1 to 6 of 6

Downloading Webpages to Excel

  1. #1
    Registered User
    Join Date
    07-14-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    52

    Question Downloading Webpages to Excel

    I have a list of URLs in column A, is there a command to download each single webpage to column B?

    I mean downloading the webpage of URL in A1 into B1, A2 into B, and so forth.
    Last edited by etrader; 01-28-2010 at 05:27 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Downloading Webpages to Excel

    Come again? What do you want to see in B1? The web page? How would you like that to look? The HTML code, javascript and CSS? The page layout complete with images and Flash? In a cell?

    Or do you want to strip the URL from

    http://www.excelforum.com

    to

    www.excelforum.com

    ????

  3. #3
    Registered User
    Join Date
    07-14-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    52

    Arrow Re: Downloading Webpages to Excel

    I mean the contents of each page (full html, html-stripped, removed scripts, whatsoever). I want to know whether it is possible.

    It can be like downloading from Web Data (from Data menu), but with two difference

    1. Extracting data analyze the page tables and insert every cell to cell of excel spreadsheet

    2. Each page should be handled manually

    Now I want to do this with a VBA command to extract the content of each page (in any possible format)
    Last edited by teylyn; 01-28-2010 at 06:20 AM. Reason: removed quote

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Downloading Webpages to Excel

    please don't quote whole posts. It's just clutter. In fact, only quote when you are referring to something particular, and then only quote the pertinent lines.

    Like this:
    full html, html-stripped, removed scripts, whatsoever
    that's pretty broad, given what a page can contain these days. Many pages use include files so you won't see some of the actual content in the html, even though you see it on the rendered page.

    Also, the html of many web pages will be too much text for a single Excel cell.

    As an example, the html for this very page you're reading right now has the CSS all written in the page, and excluding my post has over 107000 characters. Word would want 149 pages to print it all.
    You want all that in one cell?

    1. Extracting data analyze the page tables and insert every cell to cell of excel spreadsheet
    Web pages don't necessarily consist of tables anymore. Forget <table><tr><td> and get a grasp of CSS. You'll be more likely to see DIVs and SPANs in any which order, and the actual order on the visible page can be quite different, since it is commanded by the CSS. So, you may not be able to immediately recognise the "cells" unless you're good at CSS and can reverse-engineer the code.
    If you're lucky, the page uses XML, so you can at least glean some structure.

    Take a look at the underlying code for this page. Can you readily identify the pertinent parts where the actual text of the post sits?

    2. Each page should be handled manually
    Don't know what you mean by that. Can you explain?

    I think this may be a pipe dream ....

  5. #5
    Registered User
    Join Date
    07-14-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Downloading Webpages to Excel

    Thanks for good tips teylyn,

    For importing a page to excel, we should go to Data>Get External Data from Web ... I call it manuall, as one needs to do this process for each URL

    I am looking for an automatic method to import webpages by a list of URLs to excel

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Downloading Webpages to Excel

    When you use Data - Get External Data from Web, then the web page will be loaded into a sheet, not a cell.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1