Excel Application Scope - Error

Hello,

In the orchestrator I have an unattended robot, which executes a process. That process uses the Excel Application Scope activity. The following problem occurs when it is about to exit the activity, which is closing the .xlsm file:
exception from hresult 0x800ac472.

I already tried to kill the excel.exe process but it didn’t work.

I hope some other solution.

Regards,
Gianfranco

The error code states that you are trying to reopen or make changes in the already modified or existing file @Gianfranco_Drago

Does it occurs for the first time or it is occuring after a while?

Hi, @Gianfranco_Drago,

Are you opening any other excel immediately closed this excel, or trying to access the excel with different activity?. Incase if you are doing then have a delay to save this excel before use it.

Hi Gianfranco_Drago,

Read this from UiPath (there are may posts like yours):

And this from Microsoft
https://social.msdn.microsoft.com/Forums/vstudio/en-US/50081f9b-b2de-4f45-af79-69ff75b2bdcc/exception-from-hresult-0x800ac472?forum=exceldev

Some times i have the same issue and i go to task manager and kill the excel.

and you can run your robots 3days, 3 moths, 3 years with no error like that
Or
you can run your robots 3days, 3 moths, 3 years and the error can come again.

This can hapen becouse of excel file have more than 25m, becouse you have t many excel files open, your computer cache is full, bad colse of excel file …

when apens go to your task manager and see or try to close UiPath and see in task manager if any excel file is open close it and run robot again problem resolver

Thats what i now from what i read from UiPath forum and microsoft

I solved the problem. The xlsm there was, was on a shared route. I would like to know why that was a problem, because it is essential to use that route. I tried to create a folder on the desktop with the file that opened and the problem went away. I hope it helped with my solution.

Regards

Hi Gianfranco,

have you found a new solution to open with Excel Application Scope a file.xlsx in a shared folder using an unattended Robot from Orchestrator?

I have exactly the same issue!

Thanks!

LOG
Failed opening the Excel file \folder\folder\file.xlsx. Possible reasons: the file is corrupt, the file is already used by another process or you don’t have permissions to open the file.

STACK TRACE

at UiPath.Excel.WorkbookApplication.InternalOpenWorkbook(WorkbookArguments args, Boolean onlyIfWorkbookExists)

at UiPath.Excel.WorkbookApplication.Initialize(Application excelApp, WorkbookArguments args, Boolean onlyIfWorkbookExists)

at UiPath.Excel.Activities.ExcelApplicationScope.<>c.<.ctor>b__48_0(WorkbookArguments args)

at UiPath.Excel.Activities.ExcelApplicationScope.Execute(NativeActivityContext context)

at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)

at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

— End of stack trace from previous location where exception was thrown —

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)

at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)

at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)

at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)

at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

— End of stack trace from previous location where exception was thrown —

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)

at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)

at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)

at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)

at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)