I am trying to process 1 file inside a folder. This file will be removed after processing it. Then a new file saved will be saved inside that folder. The file name is dynamic. Every time I run the script I always get this error. I appreciate your assistance.
Welcome to uipath community
it seems like excel file is open when you run this xaml file , close it before running this on your computer.
Also check whether its accessed by someone while you run this file
I am 100% sure that the excel is closed when I run the script.
I’ve done it a couple of times. That script will actually work if i put the exact file path but if it contains a dynamic variable it won’t work.
First of all you need to add your excel scope in for loop and also need to close same in side for each coz you open an excel application close but you never close it.
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 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?
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.
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.
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’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.
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