+ Reply to Thread
Results 1 to 7 of 7

Importing Multiple External Web Data (Same site, slightly altered URLs stored in a sheet).

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    Mureesboro, TN
    MS-Off Ver
    Excel 2007/2010
    Posts
    6

    Question Importing Multiple External Web Data (Same site, slightly altered URLs stored in a sheet).

    Hi,

    I had a question that I searched for and did not really find a thread with answers for, although I admittedly did not dig very deeply into the archives.

    My situations is as such:

    I have a spreadsheet with about 170 URLs that are rather long. They are all in column A and listed with no other columns containing data. These URLs link to the results page of a search query on a textbook site: The search queries are all the same except for three variables, namely: "department," "class number" and "section". Thus, the URLs look something like this:

    bookstore.com/department=????&course=???&section=???

    The 170 URLs in this spreadsheet are all variations of this but contain the appropriate values for "department", "course" and "section". Thus, the first to URLs might looks like this:

    bookstore.com/department=MATH&course=101&section=003
    bookstore.com/department=BIOL&course=201&section=040

    What I am trying to do is get external data from each of these URLs and place them in a different sheet. The URLs described above all point to the same table and format but with different results (required textbooks) that I want to record, so selecting the table with each data importation is not a issue because they are all the same table.

    Does anyone have any suggestions as to how I should approach this? I have read that recording a data from the web query as a macro and then modifying its VBA code is a good way to go, but not only do I can an error message about "unable to record," but I also would later have trouble creating iterations that use the different variables values for each query contained in my spreadsheet of differing URLs.

    Thanks,

    adambk
    Last edited by adambk; 07-30-2012 at 09:51 PM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Importing Multiple External Web Data (Same site, slightly altered URLs stored in a she

    Hi

    Have a look at this

    rylo

  3. #3
    Registered User
    Join Date
    07-30-2012
    Location
    Mureesboro, TN
    MS-Off Ver
    Excel 2007/2010
    Posts
    6

    Re: Importing Multiple External Web Data (Same site, slightly altered URLs stored in a she

    rylo,

    The link doesn't seem to work....

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Importing Multiple External Web Data (Same site, slightly altered URLs stored in a she

    Another go

    rylo

  5. #5
    Registered User
    Join Date
    07-30-2012
    Location
    Mureesboro, TN
    MS-Off Ver
    Excel 2007/2010
    Posts
    6

    Re: Importing Multiple External Web Data (Same site, slightly altered URLs stored in a she

    That gave me some ideas but I have figured out the vba code to import a single, entire, page for the first url:

    Please Login or Register  to view this content.
    What I now need to do is create a loop where the macro will query all 180 urls that I have stored in sheet one of the same workbook, and for each iteration of the new query to copy the data into a new sheet (numbered 1 - 180) in the same workbook

    Can anyone help? This shouldn't be too hard hopefully...

    Thanks
    Last edited by adambk; 07-31-2012 at 04:01 PM.

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Importing Multiple External Web Data (Same site, slightly altered URLs stored in a she

    Hi

    Didn't test this at all, but try something like below. It should cycle through all the items in column A, and put the output into column B

    Please Login or Register  to view this content.
    rylo

  7. #7
    Registered User
    Join Date
    07-30-2012
    Location
    Mureesboro, TN
    MS-Off Ver
    Excel 2007/2010
    Posts
    6

    Re: Importing Multiple External Web Data (Same site, slightly altered URLs stored in a she

    Thanks rylo, I figured out a code that does the queries and puts them into different sheets but then realized that I actually need a summary of all the queries so having the output be in column B might be more efficient. I shall try it and get back to you, but either way, you have been a lot of help, thanks.

+ 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