
Vba excel download file from url internet explorer - idea useful
With VBA. grab file name automatically generated in "save as" IE pop-up
Hello,
I am relatively new to using VBA for web scraping. I am trying to collect information behind a password protected site and have been successful for the most part. There is one problem that I have not been able to figure out.
I want to obtain file names which are linked, but where the names do not exist in the HTML. Essentially, when I physically click on the link in Internet Explorer, the file name does appear and I want to be able to grab that as a variable.
I am able to trigger the event such that the "Do you want to open or save " pop-up appears. However, I have no idea how or if it is possible to GRAB the save as name that appears.
Here is a *stupid* example that ends in the save as window appearing.
I mention why it is stupid in the code below, but will repeat here. My real example does NOT have the file name in the HTML or URL used to trigger the file download - the example below does (just pretend it doesn't!).
Thank you for any ideas on how to get the file name!
As a last resort, I know I could simply download the file and then get the name from that, but this whole process is a loop and I would need to be able to link 10+ downloaded files with the loop iteration.
I am relatively new to using VBA for web scraping. I am trying to collect information behind a password protected site and have been successful for the most part. There is one problem that I have not been able to figure out.
I want to obtain file names which are linked, but where the names do not exist in the HTML. Essentially, when I physically click on the link in Internet Explorer, the file name does appear and I want to be able to grab that as a variable.
I am able to trigger the event such that the "Do you want to open or save " pop-up appears. However, I have no idea how or if it is possible to GRAB the save as name that appears.
Here is a *stupid* example that ends in the save as window appearing.
I mention why it is stupid in the code below, but will repeat here. My real example does NOT have the file name in the HTML or URL used to trigger the file download - the example below does (just pretend it doesn't!).
Thank you for any ideas on how to get the file name!
Code:
As a last resort, I know I could simply download the file and then get the name from that, but this whole process is a loop and I would need to be able to link 10+ downloaded files with the loop iteration.
Источник: www.cronistalascolonias.com.ar
0 thoughts to “Vba excel download file from url internet explorer”