I have office 2016 installed, 64bit, on a windows 10 machine. While running through lesson 9 practice 1 I’m getting this error, with or without ‘Visible’ checked. I downloaded the answer, and seems like the model answers were using an older library UIPath.Excel.Activties.WithWorkbook; this works until I check ‘UseExcelApplication’.
Anyone with a suggested fix? I dread to think how these will not work once someone upgrades to Office2016, and no, registry fix don’t sound like a reasonable solution since most enterprise OS are locked down on the registry.
I am also experiencing the same issue. The workflow works perfectly fine in my windows 7 laptop however in windows 10 I get COM exception error. Tried reinstalling office 2013 as well.
Error message:
Main (1) has thrown an exception
Source: Read the excel file
Message: Error openning workbook. Make sure Excel is installed
Exception Type: Exception
System.Exception: Error openning workbook. Make sure Excel is installed —> System.InvalidCastException: Unable to cast COM object of type ‘Microsoft.Office.Interop.Excel.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Excel._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{000208D5-0000-0000-C000-000000000046}’ failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
at Microsoft.Office.Interop.Excel.ApplicationClass.set_SheetsInNewWorkbook(Int32 RHS)
at UiPath.Excel.WorkbookApplication…ctor(String workbookPath, String password, Boolean visible, Boolean createNew)
— End of inner exception stack trace —
at UiPath.Excel.WorkbookApplication…ctor(String workbookPath, String password, Boolean visible, Boolean createNew)
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)
But If the source is excel file? Don’t you think it must be done using excel app integration?
For example if we want to automate pivot activity in excel.
To use Excel Application scope , Excel should be installed on your system because it uses MICROSOFT.OFFICE.INTEROP.EXCEL.DLL in the background for excel operations.
You can use Workbook Activities for such cases. and the only thing you have to make sure at the time of robot run that Excel should be close or should not run in the background already.
I encountered the same error running Windows 7 64-bit and 2016 Office 365 Business 32-bit. I tried a quick repair and a full repair of Office, but neither solved the problem. Eventually a full uninstall/reinstall of Office 365 did the trick and the error is no longer present. I also ran CCleaner (Registry Cleaner option) between uninstall/reinstall to remove any lingering registry issues.
Some helpful research that others might find useful in diagnosing their own environment (based on registry fixes using regedit.exe or similar):
Although this article is in an answer to Microsoft Word the top answer describes why most people encounter the problem and what to look for in the registry to fix manually. c# - Error accessing COM components - Stack Overflow
The last question in the article above cites a similar problem with a missing folder rather than an empty extra folder in the registry and a link to their fix: c# - Outlook Com not registered - Stack Overflow
In terms of where to look in the registry, I also found this article helpful. In particular if you’re running a similar environment to me with 32-bit Office/Excel on a 64-bit computer, you’ll have a HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WOW6432Node\Interface\ registry route to follow in addition to the HKEY_CLASSES_ROOT\Interface\ described in the other articles. https://www.fieldstonsoftware.com/support/support_gsyncit_8002801D.shtml
Although the article is written about Outlook, the same logic applies for the Excel error.
Always a good idea to backup your registry beforehand if you decide to do any manual fixes to it!
I encountered the “Excel not installed” error after upgrading to Office 2016 under 64-bit Win 10 Pro. I tried the quick repair, but it didn’t solve the error. I uninstalled Office and reinstalled it. After I reinstalled Office 2016 - it worked. If you’re having issues with Office 2016, try to reinstall it.
Even after reinstallation of Offices. Also Workbook Activities works (thank you @aksh1yadav) but is there any other solution for Excel Application Scope?