Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web Query with looping variables in the URL
Hi all, I am hoping that somebody can help me with my problem bcause
have been trying for weeks to get this done and am failing because o my lack of knowledge of VB. Here is what I intend to do... For a student project, I want to analyze a set of given hotels an their rates published. The Global Distrubion Systems (GDS) that contai those published rates are used by several e-commerce websites t display the rates to the online-customer. One of those sites is: *http://www.available-rooms.com* with the hotel search engine he http://res.available-rooms.com/nexre...wer_search.cgi When inserting the search options (arrival date, departure date, hote name and location), the result is a page such as this: <br / <bWarning</b: mysql_pconnect(): Lost connection to MySQL serve during query in <b/home/sites/site15/web/db_connect.php</b on lin <b3</b<br / <br / <bFatal error</b: Call to undefined function: mysqlerror() i <b/home/sites/site15/web/db_connect.php</b on line <b3</b<br / Notice that the URL carries ALL the information needed for the query: - the hotel id number - the arrival date - the departure date - number of guests - the desired currency (in this case Euros) In the search results, something like this appears: WCT Call Center Discount Rates! Total Rate: $749.39 USD Rate Plan: WCT Call Center Discount Rate Room Type: Deluxe Room with 2 Twins or 1 King Bed $749.39 USD (614.49 EUR) Nightly Rate Book Now The information I want to extract with the Excel web query is: $749.39 USD Deluxe Room with 2 Twins or 1 King Bed ========================= This information should be queried for different date patterns though so the URL should contain variables for the arrival and departur dates, where the departure date is always arrival +2 days. Example: doa_dd=22&doa_mm=09 doa_dd=23&doa_mm=09 doa_dd=24&doa_mm=09 .... doa_dd=30&doa_mm=09 (DOA_DD = Date of Arrival_Day; DOA_MM = Date of Arrival_Month) THERE IS a pretty good attempt already to be found he http://www.willowsolutions.com/tips/tips_2002_08.shtml The problem is that with my lack of VB, I am not capable of modifyin the code to my requirements... In the long, long, long end of the process, I would ideally want table structured something like this: ArrivalDate Hotel 1 Hotel 2 22/09 EUR 499,00 EUR 437,00 23/09 EUR 479,00 EUR 429,00 24/09 EUR 499,00 EUR 399,00 25/09 EUR 519,00 EUR 478,00 ..the whole thing for 5-10 hotels, to get a good picture for m project... The date ranges should be somehow inputtable without to muc difficulty (another sheet with all the dates arrival dates would b perfectly fine...). Anyway, I hope to have expressed myself somehow clearly and I do hop that somebody has the time to read my huge post here !!! Thanks i advance for anybody who can help me with my project as I am reall getting desparate!!! Regards, Titus -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web Query with looping variables in the URL
Don Guillett wrote:
[b]If you have a url like http://tinyurl.com/2f96f &bed_type=NP&num_beds=0&smoking_pref=NP¤cy_i d=&name=&brand=&priceband= try breaking it up with variables such as mycity="Austin" cache=&" & mycity & "=austin&state -- Don Guillett Hi Don, thanks for the quick response. Actually that is exactly what I a trying to do... The problem is I don't know how to write the VB part. Could you or somebody else give me a hand? The URL carrying all th information is GREAT for this purpose, using variables. I would just need a macro that pulls the web query for a certain date then moves xx lines down in the sheet and pastes the query result fo the next date and the next date and so on... Any ideas? Your help is really appreciated!! -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web Query with looping variables in the URL
Hi all, I just thought I might create something more "visual" to let yo
guys better understand what I am trying to accomplish -- Message posted from http://www.ExcelForum.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web Query with looping variables in the URL
Hi all,
I figured out that maybe my post was too extensive and seeme complicated. Let me try and reformulate the request: I want to do a webquery, where the URL of the site to query contain some variables I would like to change. http://res.available-rooms.com/nexre...ls_id=10207371 &num_adults=2 &num_rooms=1 ¤cy_id=EUR &DOA_DD=22 &DOA_MM=09 &DOD_DD=23 &DOD_MM=0 1. I need a query that counts through those variables in a certai manner (VB?) 2. I need a macro that inserts the first query in A1, the next in A2 and so on. Could anybody be so kind as to point me in the right direction? All help is appreciated!!! Thanks! -- Message posted from http://www.ExcelForum.com |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web Query with looping variables in the URL
...and there is really NOBODY who could help me?
Pleeeeeeeeeeeeeeeeeeeeeeaaaaaaaaaase!!! Thanks :-) Titu -- Message posted from http://www.ExcelForum.com |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web Query with looping variables in the URL
Send me a private email with your GOOD email. This sounds like you need a
project done instead of a question answered. -- Don Guillett SalesAid Software "titus.hanke " wrote in message ... ..and there is really NOBODY who could help me? Pleeeeeeeeeeeeeeeeeeeeeeaaaaaaaaaase!!! Thanks :-) Titus --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Looping Through Variables | Excel Discussion (Misc queries) | |||
Not at all clear on use of variables and/or object variables | Excel Discussion (Misc queries) | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
User Defined Variables in MS query cause a problem to import data | Excel Discussion (Misc queries) | |||
For Next Looping (custom variables) | Excel Programming |