Clicking a button

Rudiji

New Member
Joined
Sep 5, 2021
Messages
4
Office Version
  1. 2010
Platform
  1. Windows
Dear excel friends,

I really searched for a solution but... nothing.
Now, what is my problem?
there is a website with some buttons on it but one button will download an excel file that is updated twice a week.
It is very easy to get VBA to open that website but nothing works to get that button pushed.
On that website I found all details about that button so if anyone can help me with the correct code I will invite him for dinner.

This is from the website:
<button id="drawResults__btnDownloadResultExcel" type="button" class="btn btn-sm btn-primary" onclick="downloadResult('/api/drawresults/downloadexcelurl', 'F-f374bc7145eb404c8d60891dce60048d', 'xls')">Excel formaat</button>

Thanking you in advance,
Rudi
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I think this is rather a job for JavaScript or PHP. With those languages a button click on a website can be easily simulated.

And as I see the button click fires a function called "downloadResult" with two parameters (I guess the path and the filename).

If you could post the website URL from which the Excel file is to be downloaded I can try to do something.
 
Last edited by a moderator:
Upvote 0
Hey PeteWright,
I have zero knowledge of JavaScript or PHP, I don't even know how to implement it in excel.
The only thing I need is that the file gets downloaded the moment I open my excel.
So, the URL is: Uitslagen Euromillions - Nationale Loterij
On that webpage a little bit down on the right side there are 2 buttons next to each other, one for downloading a CSV file and one for the excel file I need.

I would love it if you could help me with it.
Image 1.png
 
Upvote 0

Forum statistics

Threads
1,215,050
Messages
6,122,868
Members
449,097
Latest member
dbomb1414

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