File is used by another process when moving file

hey guys, i’m trying to read excel files, and read all the sheets in them, and move the one i have read into another folder, but i get an error saying “the process cannot access the file because it is being used by another process”

this is my xaml
Main.xaml (25.9 KB)

please help

2 Likes

Hello @RobertoEwaldo
i think excel file is open. close that file.

Thanks

2 Likes

the excel files is not open, i also set it to not visible

1 Like

Yes the excel is not open when you ran the process, uipath is utilizing that excel file, if you go to task manager and see for excel process, it will be visible that is the reason you are getting this error .

Before moving the file or after reading using kill process and kill excel.

2 Likes

hi, @RobertoEwaldo
Use kill process …before all the activities in excel scope…and mention the jnput as “excel.exe”…or to get the correct name…you can check with task manager…enter view tasks…open task manager…see the process…check what is the exe file name of your excel…mention that in the kill process as a string input…

Cheers…

Hope this would help you…

1 Like

Hi @RobertoEwaldo

I have checked and corrected the issue… Now it’s working…

I have added a Kill process activity just above the move file activity. So though excel application scope has ended by the time you are moving it, still the process is active in the background. That is why you are getting the error.

Please change the file paths bro. and I have removed your file name conditions to test it :slight_smile:

Main.xaml (26.0 KB)

Let know whether this helps to figure out your error :slight_smile:

If it works, please make sure to mark my answer as the solution too…

3 Likes

it worked ! Thanks a lot.

2 Likes

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