Power query to access website, provide parameter and read response

pjmorris

Well-known Member
Joined
Aug 2, 2012
Messages
2,172
Office Version
  1. 365
Platform
  1. Windows
Hi,

I don't know if this is possible, but I'd like to access this website: https://vehicleenquiry.service.gov.uk/ which then requires a vehicle registration number and in reply will display the make and colour which is all the information I need.

I know Powerquery can access web pages, but I don't know how to pass a parameter into the page. Is it even possible?

Many thanks.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
When accessing Power Query, make sure that you select the Advance option, instead of Basic. Then, after you've enter the URL, you can add any parameters as follows...

parameters.jpg


Hope this helps!
 
Upvote 0
Hi Domenic,

Many thanks for the suggestion, I've tried a number of guesses as to what could go in those boxes. I even looked at the script for the webpage - but its way beyond me to interpret. It just looks like a plethora of embedded functions in functions. Probably entirely understandable to the author!

Thanks again.

Peter
 
Upvote 0
Long story short, navigate to the page and get it to show the data you want. If you can’t cut and paste a URL and open the exact same page showing the data you want in a new browser, you can’t download with Power Query. Using Python is a more complete solution but there is a steep learning curve.
 
Upvote 0
Thanks Matt, I suspected that that might be the case. I don't have any knowledge of Python nor, I believe, a platform to run it on.

Thanks again.
 
Upvote 0
You probably need to POST form data with:
authenticity_token=tokenProvidedByWebsite
wizard_vehicle_enquiry_capture_vrn[vrn]=thePlate
 
Upvote 0
You probably need to POST form data with:
authenticity_token=tokenProvidedByWebsite
wizard_vehicle_enquiry_capture_vrn[vrn]=thePlate
Hi Edgar, but I don't understand how to obtain the token or how to POST using excel/powerquery.

Regards
 
Upvote 0

Forum statistics

Threads
1,224,845
Messages
6,181,301
Members
453,031
Latest member
Chris_1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top