+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    11-24-2009
    Location
    Hull, England
    MS-Off Ver
    Excel 2003, 2007
    Posts
    32

    Import html from website into cell possible?

    Hi guys, I was curious about this after seeing someone else write about it and not explain himself properly, consequently getting no-where.

    I know excel is not a web-macro tool but it manages data very well and does support VB which is sadly beyond my abilities.

    Why do I want to do this?

    In my spreadsheet I have a url, every link goes to the same site and all the info on each page I need is in the same container on the web site.

    This saved in a cell as text, when uploaded as a tab-delimited file into an inventory system, provides nice clean html descriptions without me having to write everything.

    It's an Excel approach to copy & paste in data terms. Handling data in a cell is fine but getting it is another question. This requires interrogating the site's html, finding the block in question and grabbing it.

    Any suggestions would be extremely welcome!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & read 2007
    Posts
    15,498

    Re: Import html from website into cell possible?

    Hello datacruncher,

    Are you familiar with Excel's "Web Query"? This allows you to open a web page and select the information you want from the page and put it on a worksheet. You can find it on the menu bar: Data > Import External Data > New Web Query...
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    11-24-2009
    Location
    Hull, England
    MS-Off Ver
    Excel 2003, 2007
    Posts
    32

    Re: Import html from website into cell possible?

    Hi, yes I am familiar with this function and have tried playing with the html options in the import window. It still only imports the page to a whole worksheet, it also won't select the frame I am hoping for. I think I need a VB guru..

  4. #4
    Registered User
    Join Date
    11-24-2009
    Location
    Hull, England
    MS-Off Ver
    Excel 2003, 2007
    Posts
    32

    Re: Import html from website into cell possible?

    I was reading this guide on iql and xsl and I was wondering if this method could be used to run queries from my list of urls?

    The pricelist sheet has over 7,000 products, image links and page urls and the data I want is inside the same DIVs on every page. If I actually copy this html from the browser DOM viewer I can select a cell, hit F2 and paste the whole lot into one cell. Feeling like a robot I wondered if it was possible to automate by applying a web query to the url and selecting the data that is captured in the query language?

    Snippet from inside DIV tags:

    Code:
    <h3>Product <span class="prodTitle">Overview</span></h3>
                <h4>Summary</h4>
         <p>Product Title</p>                   <h3>Product <span>Features</span></h3>
           <h5>Currently No Information Available</h5>
    
          <h3>Product <span>Extra</span></h3>
    Is anyone an expert on web query writing?

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0