Excel Application Scope: Failed opening the Excel file . Possible reasons: the file is corrupt, the file is already used by another process or you don't have permissions to open the file

use delay of 5 seconds before closing application , if you still face issue then it use kill process after delay.
Root cause is excel.exe is running in background you can check your task manager for same, so our goal to close excel application from uipath robot agent and make it work.,

I was facing same, replaced excel scope with Workbook. It worked

I am also facing same issue. Tried with creating new file, closing all excels ,restarting server etc but all failed. Does anyone knows why it is coming and what could be the possible solution?

Thanks

Also have same issue, looks like, a Uipath bug. Are there any solutions?

I encountered the same problem, seems like you can’t use a lot of operations in the path text editor of the Excel App Scope activity.

The problem got solved when I assigned the path in a string and directly place the string as the path in the Excel App Scope activity.

Hello,

I had the same issue: "Excel Application Scope: Failed opening the Excel file … Possible reasons: the file is corrupt, the file is already used by another process or you don’t have permissions to open the file. "

My solution for this issue was to kill the process UiPath.Service.UserHost.exe from Task Manager.

After that, the message was gone and the Excel Application Scope activity was OK.

2 Likes

HINT

I spent many hours on this… Now I know, that Excel application scope is not compatible with background job. Please, check if you have Starts in Background selected as No.

If you have xlsx filetype, then use System/File/Workbook/ activities, not App Integration/Excel/ activities if you wan to have background job.

Hopefully this helps.

3 Likes

Dears,

I hope that this thread is still being read by people having the same problem. Please also check if your drive is not full or whether it has enough space to read your/open the excel file. I experienced this and after cleaning out my drive, it works again.

I have the same problem. It was not there before and now it is. I didn’t change the design and it stopped working. Massacre. Uipath 2022.04

1 Like

As an alternative way, please check the path. The file may not be in the location you are looking.

Best

I had the same issue I solved it by letting the bot save the file with a different format - .Replace(“.xlsx”,“.xls”)

Hey @ apurvalost

I’ve had the same problem recently. I solved it by checking the Read-only property on the Excel Scope Activity. In my case, I don’t need an excel file update. I’m using Uipath 2022.04 Community Edition.

Cheers

Hello team
I have getting this error please help me
Possible reasons: the file is corrupt, the file is already used by another process or you don’t have permissions to open the file. "

One reason could be the length of the File. If the length of the File name including path is more than 256, it throws this exception. Try renaming the file to fit within 256 chars

pls what was the activity title used for adding that specific workbook to the workflow

pls how did you do this in details?..thanks

pls can you show me how?

To overcome the exception - ‘Excel Application Scope: Failed opening the Excel file C:\Users\abcde\13Oct2023_135011.xlsx. Possible reasons: the file is corrupt, the file is already used by another process or you don’t have permissions to open the file’ , I have added delay of 5seconds (delay should be minimum 5 seconds as the bot needs to save the background excel operations) before killing the ‘Excel’ app. This worked for me.

I was facing even, replaced the scope of Excel with the Workbook. It worked

I solved the problem by shutting down UiPath User Service or all services related to UiPath in the process
我通过这个解决了问题,在进程中关闭Uipath User Service或者有关uipath所有的服务