Microsoft Excel cannot access the file

studio

#1

Hi, I have an exception

Microsoft Excel cannot access the file

• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.

I had a excel application scope with a read range (not workbook read range) with autosave and visible checked. This is the first time the file path was called during the workflow.

Client has informed me that they are sure they’ve placed the file in the right place with the right name, and the file was not being accessed by anyone. But the file being called for the first time and it being the first excel application scope robot used would have eliminated that any opened file has the same name as the workbook im trying to save.

Are there any possible reasons that could have caused this exception?


#2

@inyourgravity,

We faced the same issue for 2 or 3 Excel files [Mainly ‘The file is being used by another user’].

For the solution, We disabled ‘Auto Save’ property and saved our workbook with ‘Save Workbook’ activity at the end of Excel Application Scope. Which works totally fine now without any error.

Whenever BOT writes the data into excel file and tries to auto save the file, This error occurs at random step.

However, Please check your Excel’s package version, update and try.

Regards,
Parag Pandya