I am taking RPA Training course and practice reading and writing Excel with UiPath. I ran into the error at Write Cell Workbook: The process cannot access the file because it is being used by another process. I tried delay for 2 secs but still would not work.
Hi @thao.dinh
try using kill process before write cell workbook
Or increase the delay to 5 sec
Or use one excel application scope and do all the activities inside themā¦so that the excel is not opened multiple times and you can set application scope to not visible as well
Hope this helps ![]()
Hi @AJ_Ask ,
I suppose you have the targetted workbook open when trying to execute the workbook.
The Best practice to follow when we are automating any application or browser is to check if the target application/browser is open before starting the actual automation to avoid any exceptions like this.
Please try closing the workbook before executing the bot.
or
add a sequence to check if workbook is open and close it as required.
Happy Automatingā¦!
Thanks,
Gautham.
Hi @thao.dinh ,
The message content shows that your Excel is open, try it
- kill Excel process before āwrite cellā or
- Open task manager to see which tasks are taking up Excel, restart the computer before running again. To ensure a process works well, kill the applications used in the process before Run
Regards,
Luong
Welcome to the UiPath Community ![]()
Root Cause:
You are using Write Cell Workbook Workbook activity which have some of itās own advantages and limitations.
One of the limitation is it will fail or throw exception if the file itās going to use is already open on the system.
Solution:
You can use kill process activity before using workbook activity to kill excel.
Thanks,
Ashok ![]()
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
