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.
Attach is the xaml of the script I’m working on.
Main.xaml (6.6 KB)
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.
excelClose.zip (13.4 KB)
Try this out
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.
I tried to do the for each and the same exact thing that you did and I keep getting the same error.
I followed some of the posts here in the forum. It seems that this is a common issue that is being encountered if you use excel scope.
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?
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.
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.
Hopefully this helps.
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
As an alternative way, please check the path. The file may not be in the location you are looking.
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.
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