• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Help wanted - extracting data from the web using Excel 2007

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #21
    Originally posted by k2p2 View Post
    Not wishing to be picky but...

    BOE are using tables for their interest rate.
    Yes, I noticed that after I posted. However in this context a table is only a table if Excel 2007 web query wizard allows you to select it. I've noticed previously that it doesn't recognise some tables.

    Comment


      #22
      Special thanks to NickFitz for recent posts - it will probably take a day or two before I understand everything you say, but I feel you are putting me on the right track.

      Comment


        #23
        Originally posted by IR35 Avoider View Post
        Yes, I noticed that after I posted. However in this context a table is only a table if Excel 2007 web query wizard allows you to select it. I've noticed previously that it doesn't recognise some tables.
        It seems to me to reliably recognise a <table> tag, but I'd be interested in hearing about situations where that hasn't happened.
        +50 Xeno Geek Points
        Come back Toolpusher, scotspine, Voodooflux. Pogle
        As for the rest of you - DILLIGAF

        Purveyor of fine quality smut since 2005

        CUK Olympic University Challenge Champions 2010/2012

        Comment


          #24
          Originally posted by Zippy View Post
          It seems to me to reliably recognise a <table> tag, but I'd be interested in hearing about situations where that hasn't happened.
          I use the OPs approach quite a lot and its inconsistent. Not as bad as when you want to refresh a number of them and the bloody internet slows up. I tend to loop through a number of webqueries on multiple pages and the concatenate the data.
          What happens in General, stays in General.
          You know what they say about assumptions!

          Comment


            #25
            I don't want to seem incredibly lazy, but it occurs to me that what I need is a web-based web data extractor, that effectively works like the Excel wizard in that it will take a supplied URL and let you point at something on that page, and generate a web page that just contains that thing. It just needs to improve on Excel by not restricting the selectable items to (most) tables.

            In other words, no need to work out the syntax of a query.

            Once you have that, excel can pull in the data from the resulting page, using its query wizard.

            (Not sure if YQL query builder answers this description, will have to look into that.)
            Last edited by IR35 Avoider; 20 November 2011, 18:54.

            Comment


              #26
              Down bottom of this page on my site is the current Worldpay GBP-EURO conversion.

              Gatekeeper Sales

              See page source, 2 elements and a tiny bit of jscript, sidepics function not relevant. Seem to recall I used the hidden and visible elements with jscript copy between due to an appearance problem with frame border, so jscript may be quite unnecessary, just bung value in visible element in 1st place. All it uses otherwise is some fairly self explanatory PHP:

              <?php
              $data = file_get_contents("https://select.worldpay.com/wcc/info?op=rates&instId=123456",0);
              $pos = strpos($data, "rateDateString")-1;
              $date = substr($data,1, $pos);
              $clen = strlen($data) - strpos($data, "GBP_EUR") - 8;
              $data = substr($data,-$clen);
              echo "$date<br>1 British Pound = $data Euro";
              ?>

              Only problem might be accessing some external websites from third party hosting, security and all that.
              Last edited by xoggoth; 20 November 2011, 20:06.
              bloggoth

              If everything isn't black and white, I say, 'Why the hell not?'
              John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

              Comment

              Working...
              X