Failed Opening Excel File

Hello,
I am using the “Use Excel File” activity with a file downloaded from a browser and get the following error message on the first run of the main:

If I go into my download folder (the landing place of the downloaded from browser file) and open the excel sheet, then immediately close it again and click “Retry” on the error, it processes correctly. Note, this only happens the first time I run a bot, not any subsequent runs following successful execution of the first.

I’ve been reading up on similar errors on this forum and see that sometimes microsoft will save a .tmp file or add a “$” symbol to the file name as a backup. I’m not seeing that, the folder that the file is downloaded into is showing the correct file name (this name is given to the bot from a “get text” activity in real time as well) and there are no additional .tmp files or differently named files surrounding it.
image

Any suggestions on how to avoid the corrupt file error? There is nothing leading me to think it is actually corrupt or open etc. since a) I can open it just fine manually to retry the error and b) the file is never open on my desktop after I save it. Is this an excel setting I need to change, or perhaps I need a delay after the file download to ensure the process is complete before attempting to use it? I can add a workflow to automate the opening and closing of the file as I do but it seems like there is an easier way that I could be missing.

I have seen this happen when the file is not fully downloaded. If you are verifying the file is fully download then you may want to try a short delay before opening.

Thank you Joseph, a delay after the file download seemed to solve the issue!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.