+ Reply to Thread
Results 1 to 3 of 3

Automatic web data query/extraction

  1. #1
    Registered User
    Join Date
    02-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Automatic web data query/extraction

    Hi All,

    I'm not too sure whether this is even feasible, so am just throwing this out there to get some opinions.

    My understanding is that Excel can be used to download information off websites automatically, through web queries and iqy files. I am wondering whether it would be possible to use this, or any other method, to extract information automatically off the webpage?

    For example, for the following website, I would need to key in postcodes manually in order to return store locations.

    http://www.guardianpharmacies.com.au...store-locator/

    Would there be a way to set up excel such that it does it automatically?

    Thanks in advance, help is much appreciated!

    Best Regards,
    John

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Automatic web data query/extraction

    Hi JohnLee and welcome to the forum.

    I was looking for a big table that you could simply import into Excel and have and use, but found this instead.
    http://www.jpsoftwaretech.com/lookin...-postal-codes/
    Does this help?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Automatic web data query/extraction

    Hi MarvinP,

    Thanks for the welcome and apologies for my late reply! I was under the assumption that I'd be sent a notification when someone did reply, maybe I was mistaken.

    I'm not too good with syntax/code, but from my understanding of the steps in that link you posted, it does seem that it can be adapted for my purposes.

    From my reading of other threads, I think it might be feasible for excel to autofill forms, through it's integration with IE. Broadly, the steps seem to be as follows:

    1. From base url, use a html element inspecter (Chrome has one native to it) to find the user text input box division (e.g. <input type="text" name="pc" value="3042 " class="itext02">)

    2. Have a list of inputs that you want to iterate through sitting in excel.

    3. Iterating through each input in turn (probably a macro), ask excel to send the input to the input box division at the url, through a url call, as a POST request, and submit the information to the url.

    4. Have some way to filter the returned data, which can be something like tags (e.g. <div>, or class = "address"), or even using the find function to filter out what is needed (e.g. find=address?)

    5. Reset loop, and iterate through next input item.

    Apologies if this doesn't make sense, I'm just throwing out ideas here. Could anyone verify whether the steps above make sense, and if possible help formalize it into functional code?

    I was using the following links as reference:

    http://www.excely.com/excel-vba/ie-automation.shtml

    http://www.mrexcel.com/forum/showthread.php?t=482148

    Thank you and help is much appreciated!

+ Reply to Thread

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.6.0 RC 1