![]() |
|
#1
|
||||
|
||||
![]() Try this: Code:
Sub Test() Sheets("Temp").Select URL = "URL;http://www.metacritic.com/search/all/results?cats[game]=1" & Range("L4").Value MsgBox URL With ActiveSheet.QueryTables.Add(Connection:=URL, Destination:=Range("M5")) 'blah, blah, blah End With End Sub |
#2
|
|||
|
|||
![]() Quote:
http://www.metacritic.com/search/all/results?cats[game]=1 Range("L4").Value L4 value is : &date_range_from=09-31-2013&date_range_to=12-31-2013&score_range_from=60&search_type=advanced If you combine the 2, it works. |
#3
|
||||
|
||||
![]()
Yep, I get the same thing. I played around with the URL a while, in the program, and believe it or not, what appears to make it unhappy is the square brackets; my browser thinks they're valid, alright, but when I remove "[game]" from the URL then the VBA error goes away.
This may not be good news for you. Unless there's a way to persuade VBA that this is a valid URL, or a way to get the data from metacritic without the square brackets, you may have to rethink your solution. But the first thing I'd do is start asking around to see whether there's an Excel setting that'll tell it to be less stringent about valid URL characters. Maybe you'll be able to Google something about it. Failing that, maybe the folks at metacritic can offer you a workaround. I might have googled it myself, but I gotta go soon; I have a meeting in a few hours. |
#4
|
|||
|
|||
![]() Quote:
I've simply put the "[game]=1" portion in my L4 formula and it seems to work for now. Now I need help for the next steps! :P Should I make another topic? |
#5
|
||||
|
||||
![]()
Really? You put the square brackets in another part of the URL and it worked? Now I'm not sure what to think.
Anyway, my suggestion is that you ask your next question here and I'll see what I think. If it's beyond my expertise, I'll suggest that you start a new thread, so that others will see it (instead of glancing at this one and mutter "oh, someone else already has this one"). |
#6
|
|||
|
|||
![]() Quote:
Code:
Sheets("Temp").Select URL = "URL;http://www.metacritic.com/search/all/results?cats" & Range("L4").Value With ActiveSheet.QueryTables.Add(Connection:=URL, Destination:=Range("M5")) So for now, the only thing we managed to do is to connect excel to the website. I need to collect the data from the website in question. So some type of information which is on this page : http://www.metacritic.com/search/all/results?cats[game]=1&date_range_from=09-31-2013&date_range_to=12-31-2013&score_range_from=60&search_type=advanced More specifically : game console, score of game, name of game and published date. Do you know how? |
#7
|
||||
|
||||
![]()
I used to—just not using this method. As I said earlier (or maybe that was a different thread), I used to use a .dll that apparently is not available after Win XP. That method involved pulling HTML code from a web page and either parsing the raw HTML or navigating your way downward in a sort of tree structure: The document, then the body within the document, then the third division in the body, then the 14th table (or the element named "XYZ") within that division, then run through the records in that table one at a time and pull out the 3rd and 5th cells from each record...that kind of thing. Probably required more effort than this QueryTable thingy, but more flexible too; that's the usual tradeoff.
Well, I've been wanting to regain the ability to automate web calls, so this'll be my excuse. Let me play with it and see what I can figure out. I'll be back....eventually. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Match two sets of data and display specific data | lolly150 | Excel | 1 | 05-14-2012 10:33 PM |
Edit Data Source- Linking template charts to new data | lbf | PowerPoint | 0 | 10-28-2011 12:19 PM |
Powerpoint: adding data to trend lines w/o data labels | HaiLe | PowerPoint | 0 | 04-11-2011 09:21 AM |