Make sure Excel is installed in this computer only when running From Orchestrator

excel

#1

Hi all,

I have been experiencing some trouble when running a process from Orchestrator. The process works perfectly when I run it from Studio but when doing it from the Orchestrator I always get this error:

“Execution error : System.Exception: Error opening workbook. Make sure Excel is installed. —> System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005 Error en la ejecución de servidor (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).\r\n at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType)\r\n at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(RuntimeType serverType)\r\n at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj)\r\n at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)\r\n at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)\r\n at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)\r\n at System.Activator.CreateInstance(Type type, Boolean nonPublic)\r\n at System.Activator.CreateInstance(Type type)\r\n at UiPath.Excel.WorkbookApplication…ctor(String workbookPath, String password, Boolean visible, Boolean autoSave, Boolean createNew, String editPassword)\r\n — Fin del seguimiento de la pila de la excepción interna —\r\n at UiPath.Excel.WorkbookApplication…ctor(String workbookPath, String password, Boolean visible, Boolean autoSave, Boolean createNew, String editPassword)\r\n at UiPath.Excel.Activities.ExcelApplicationScope.Execute(NativeActivityContext context)\r\n at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)”

I don’t understand why this happens since when I watch it live I never get this error. Moreover I have other processes that use the same activity (Excel Application Scope) running in the same Machine but with different user and never get this error.

Can you provide some help please?

Kind regards,

Fernando


#2

can you try to invoke the worflow inside “LaunchWorkflowinteractive” and before you start the process close the excel application/kill excelapplication(only when close is failed else this might crash the excel application) inside your workflow.


#3

Hi @Divyashreem. Thanks for replying but I couldn’t make it work with your solution.
On the other hand, I managed to solve it so I will post it here in case someone faces the same issue.
The problem was that the excel path in the Excel Application Scope Activity was set as an absolute route, so I changed to a relative one and made it work.