I need some help with a Web Query.
The URL below pulls rates for a car hire from eBookers.com. If you copy/paste it into your browser, you will see what the I am talking about. I can't get Excel to return the information in a web query. [Invalid Web Query]
If I remove the last part of the URL...['searchView'].expandedCarTypes=true...the query runs but does not return the expanded view of car types (4x4's, mini-vans, etc.). I need the expanded view.
Can someone please review this URL and see what I am doing wrong?
'------------------------------
Sub eBookersShop()
Sheets("Query").Select
'clear old Query
Rows("7:50000").Select
Selection.QueryTable.Delete
Selection.ClearContents
Range("A1").Select
sURL = "URL;hxxp://www.ebookers.com/shop/carsearch?car.airport.endDate=13%2F08%2F11&car.airport.transmissionType=U&car.airport.dropoffTime=10AM&car.airport.airConditioning=U&type=car&car.dropoffType=SAME&car.airport.startDate=10%2F08%2F11&search=Search+Cars&car.airport.dest.key=&car.airport.pickupTime=10AM&car.airport.driversAge=25&car.airport.orig.key=AMS&car.pickupType=AIRPORT&models[/url]['searchView'].expandedCarTypes=true"
With ActiveSheet.QueryTables.Add(Connection:=sURL, Destination:=Range("A9"))
.Name = "eBookers"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
'------------------------------
The URL below pulls rates for a car hire from eBookers.com. If you copy/paste it into your browser, you will see what the I am talking about. I can't get Excel to return the information in a web query. [Invalid Web Query]
If I remove the last part of the URL...['searchView'].expandedCarTypes=true...the query runs but does not return the expanded view of car types (4x4's, mini-vans, etc.). I need the expanded view.
Can someone please review this URL and see what I am doing wrong?
'------------------------------
Sub eBookersShop()
Sheets("Query").Select
'clear old Query
Rows("7:50000").Select
Selection.QueryTable.Delete
Selection.ClearContents
Range("A1").Select
sURL = "URL;hxxp://www.ebookers.com/shop/carsearch?car.airport.endDate=13%2F08%2F11&car.airport.transmissionType=U&car.airport.dropoffTime=10AM&car.airport.airConditioning=U&type=car&car.dropoffType=SAME&car.airport.startDate=10%2F08%2F11&search=Search+Cars&car.airport.dest.key=&car.airport.pickupTime=10AM&car.airport.driversAge=25&car.airport.orig.key=AMS&car.pickupType=AIRPORT&models[/url]['searchView'].expandedCarTypes=true"
With ActiveSheet.QueryTables.Add(Connection:=sURL, Destination:=Range("A9"))
.Name = "eBookers"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
'------------------------------