Failed Opening Excel File in Long Running Worflow

Hi all,

we are facing an issue with accessing an excel file AFTER creating & completing a task with Action Center.

Within our process, we calculate a report in Excel. Since there are always a few items where a human user needs to decide whether they should be part of the report or not, we used a long running worfklow with Action Center. The human user needs to approve/disapprove for a bunch of items and after confirmation the bot will pick up the work, adds the approved items to the report and sends it to a specific user group.

Our issue is: After task completion when the robot starts working again, we have an “Excel Application Scope” with included “Read Range” Activity. This Activity causes the following error:

Since the error message gives some hints with regards to permissions/concurrent usage etc. we tried a few workarounds (closing workbook in previous steps, delays, etc.) but nothing worked.

This issue occures directly after Task completion in Action Center so we thought this might be relevant for causing the error.

The following might be interesting, too:

  • This error only occures on PROD environment. In DEV, everything works fine
  • Since the Excel File where the error comes up is used before task creation in Acion Center already, we tried to use a completely random Excel file which is not used before instead. This didn’t work neither.
  • We listed all excel related processes direct in front of the Excel Application Scope Activity to check whether there is already an Excel instance opened causing the error, but nothing was shown.

I really appreciate every kind of help! Thank you very much in advance!

Kind regards!

Hi @kaunta04

and welcome to the forum

I had something similar before and it was because the Excel process was still running and the temp file was available. So the Excel was still open for UiPath, although this was not factually the case.

I killed Excel with “kill-process”, waited 3 seconds until Windows had removed the temp file and then I could read the Excel again.

Maybe this helps you.

Hi @MarioHerrmann,

thanks for helping out! I tried what you proposed but unfortunately it didn’t work.

In the meanwhile I found the solution and wanted to share it:

I found a post and the proposed solution worked (even it was pretty weird though :)):
https://social.msdn.microsoft.com/Forums/office/en-US/280ae437-58fd-4bb9-903f-1ca331823f7d/systemruntimeinteropservicescomexception-0x800a03ec-microsoft-excel-cannot-access-the-file?forum=exceldev

Solution:
"The solution is an odd one: create the directory “Desktop” inside the directory "C:\Windows\SysWOW64\config\systemprofile".

eg: “C:\Windows\SysWOW64\config\systemprofile\Desktop” (for 64 bit Windows)

  "C:\Windows\System32\config\systemprofile\Desktop" (for 32 bit Windows)

Note: Set Full control permissions for directory Desktop (for user “SYSTEM”)"

Kind Regards

1 Like

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