Error opening workbook. If Excel is installed, run the ‘Repair Tool for Microsoft Office Interop’ from the Tools tab on the Home screen

Hi,
I have a robot, need to read excel and open application.
I run robot with under command.
C:\Users\uania\AppData\Local\UiPath\app-21.4.4\UiRobot.exe -file C:\ProgramData\UiPath\Packages\myrobot.1.1.2.nupkg
The robot can work normally,but opening the application requires upgrading permissions,I modify command to this.
runas /user:administrator "C:\Users\uania\AppData\Local\UiPath\app-21.4.4\UiRobot.exe -file C:\ProgramData\UiPath\Packages\myrobot.1.1.2.nupkg"
I get an error when execute.
error:

Error opening workbook. If Excel is installed, run the ‘Repair Tool for Microsoft Office Interop’ from the Tools tab on the Home screen.
   at UiPath.Excel.Helpers.ExcelInteropHelpers.GetNewComApplication()
   at UiPath.Excel.Helpers.ExcelInteropHelpers.StartNewApplication(ExcelStartOptions options)
   at UiPath.Excel.Helpers.ComApp.ExcelComAppReferenceCountManager.InternalComAppReferenceCountManager.StartNewApplication(ExcelStartOptions startOptions)
   at UiPath.Shared.ComAppReferenceCountManager`3.StartOrAttach(TComAppStartOptions startOptions, Boolean& wasAlreadyRunning)
   at UiPath.Excel.Helpers.ComApp.ExcelComAppReferenceCountManager.StartOrAttach(ComAppOptions comAppOptions, ExcelStartOptions excelStartOptions, Boolean& wasAlreadyRunning)
   at UiPath.Excel.WorkbookApplication.AttachOrCreateNew(WorkbookArguments workbookArguments)
   at UiPath.Excel.Activities.ExcelApplicationScope.<>c.<.ctor>b__53_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)

I tried repair tools,no use
Thanks

Hi

Did we try with WORKBOOK activities

Search as workbook in activity panel and try with READ RANGE under that

This doesn’t require excel to be installed
So it will work in all scenarios

Hope this would help you resolve this

Cheers @13051156620

2 Likes

@Palaniyappan Thanks for the response, I tried WORKBOOK->Read Range,it worked well at develop machine.
I’ll come back after dempolay the problem on the formal environment.
runas /user:adminstrator works fine on my computer,I guess it’s an environment problem with the administrator account.

Best wishes

1 Like

Hi,
It solved my problem.

Cheers

1 Like

Great
Pls mark the relevant post as a solution

Cheers @13051156620

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