I have a use case that involves downloading an excel file from a website, after the download this new file should overwrite an existing file in some folder.
I get stuck after clicking the download link. How do I proceed to use the new file/data to overwrite the old file?
Thanks for your reply, but unfortunately this is not exactly what Iâm looking for. Iâll try to explain a little bit more in detail what I need:
I have an excel file with a specific name in a specific folder (No postfix)
Every day, I want to replace this file (or overwrite the data in this file) with the new file/data I get from the download.
The file I download does not have the correct name yet and is not automatically downloaded to the correct folder.
So for example, the file I would like to replace looks like this:
Filename: âMyFile.xlsxâ
Folder: â\something\something\Desktopâ
The downloaded file is like this:
Filename: âNotMyFile.xlsxâ
Folder: â\something\something\Downloadsâ
In the end âNotMyFile.xlsxâ should become âMyFile.xlsxâ in folder â\something\something\Desktopâ
There is a feature built into the chrome extension for this exact case
Add âWait for downloadâ activity, and INSIDE that, do the click that triggers a download.
then AFTER the âWait for downloadâ use the event from âWait for downloadâ to get the filename of the downloaded file.
This will not overwrite the old file, but it WILL give you the current/new name.
Thank you very much for your reply, I think I figured it out!
One more question, Iâm now using ReadExcel and WriteExcel to extract the data from the downloaded file and update the correct file. The problem is that the downloaded file has a worksheet name starting with numbers, for example â1 sheetâ. Which results in this error:
The table name â1 sheetâ does not begin with a letter, an underscore or a backslash.
Is there a way to change the name of the Worksheet or another workaround?