+ Reply to Thread
Results 1 to 4 of 4

Multiple Web Queries from List of Web Pages

  1. #1
    Registered User
    Join Date
    12-12-2010
    Location
    Louisville, KY
    MS-Off Ver
    Excel 2000
    Posts
    2

    Multiple Web Queries from List of Web Pages

    Hello:

    I have a list of webpages that do not increment in any logical order -- instead they are individually named.

    I have built a macro that, theoretically, should do the following operation:

    1) Start by taking data in Sheet2.A1 (the website URL in A1) and run a web-query wherein the entire page is returned to me in Sheet1.A1.

    2) I then set Sheet2.B1 and Sheet2.C1 equal to Sheet1.A3 and Sheet1.A16 respectively.

    3) I increment my counter and the next iteration should take the URL in Sheet2.A2, run the query and take the new data in cells Sheet1.A3 and Sheet2.A16 and place that data into Sheet2.B2 and Sheet2.C2, respectively. This is to loop 223 times. I can talk about catches later where we stop at null-valued cells or do this in batches.

    Here is my VB script code:

    Please Login or Register  to view this content.
    Also, I am running MS Excel 2000. Thank you so much for your help!

  2. #2
    Registered User
    Join Date
    12-09-2010
    Location
    Essex, England
    MS-Off Ver
    Excel 2002
    Posts
    41

    Re: Multiple Web Queries from List of Web Pages

    What's the problem?

    Without checking it, I seem to remember you need to delete the query table once you're finished with it. Should you be doing that on each pass?

  3. #3
    Registered User
    Join Date
    12-12-2010
    Location
    Louisville, KY
    MS-Off Ver
    Excel 2000
    Posts
    2

    Re: Multiple Web Queries from List of Web Pages

    Quote Originally Posted by martinleyland View Post
    What's the problem?

    Without checking it, I seem to remember you need to delete the query table once you're finished with it. Should you be doing that on each pass?
    Well, I go to run the macro and nothing happens...the vbscript builder gives me no errors to fix, as well.

    Concerning deleting the old query table, I'm not sure where to go there in this situation. If new iterations of the query overwrite in the destination cells, this is fine with me -- all the webpages I am querying have EXACTLY the same format, it's just that the site has no clear "increment" element in the web addresses for which I am querying, otherwise I would have used the many fixes that exist in the world for such a situation.

    All my web addresses to be used appear to be Name-IDNumber.html, wherein the alphabetical order of their names is not indicative of their ID number, nor are the ID numbers a complete, step-wise sequence when taken by themselves. The web addresses I am using incidentally have no clear tables in their web source, hence my selection for the entire page...and my use of web addresses that I already stripped out ala text-to-columns function upon manually pasting in the source. I have proprietary a stripping program that could do this if they rigged each of the webaddresses I had to "harvest" with a "Next" or "Back" link to the previous level of the the webdirectory they reside. Otherwise, this is why I am here asking for your help.

    Thank you for the reply and thank you for any help you might have to offer.

  4. #4
    Registered User
    Join Date
    12-09-2010
    Location
    Essex, England
    MS-Off Ver
    Excel 2002
    Posts
    41

    Re: Multiple Web Queries from List of Web Pages

    I put www.bbc.co.uk, www.reuters.com, www.bloomberg.com in cells A1:A3, then ran this:

    Please Login or Register  to view this content.

+ 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