Excel addin runtime error

Hi,

Studio is flagging: “Excel Application Scope Input file XLS: Error opening workbook. Make sure Excel is installed.” when trying to read a range from an XLS.

I’ve done quite a bit of troubleshooting on this error and attempted many suggestions posted on this forum; i.e repaired office 365, reinstalled office 365, uninstalled and reinstalled studio. Checked the registry for 32bit excel entries. But still encounter the error.

I then checked the excel addin. The com addin appears in the inactive section even though UiPath.Integration.ExcelAddIn.vsto installed without error.

when I try to manually add it via com-addins it’s showing the load behaviour as encountering a runtime error.

this is occurring with 2020.4.1-beta.22

Does anyone have any suggestions how to resolve this?

Hy @stephensg,

I recomend you use a kill activity process name excel, prior to run an Excel activity, it could explain the erorr.

Regards

Hi William,

Thanks for the suggestion. I added an excel kill process (can confirm any open excel instances were killed after running) but still getting the “Excel Application Scope: Error opening workbook. Make sure Excel is installed.

I’ve also added the excel path to my system PATH variable, with no result.

Is the Excel addin needed to use Excel activities from studio?

Quick update. I managed to get the Addin installed and appearing as active in the excel add-ins when I switched studio profile to studio-X and installed it via the tools menu.

The below error did appear in the excel install logs:

"[12/06/2020 6:17:55 AM] StartExcelAndCheckAddInConnection - COM error during AddIn validation checks: Exception setting “DisplayAlerts”: “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: Interface not registered (Exception from HRESULT: 0x80040155).”

I’m still unable to get studio to run any excel activities (work book or app integration) even with the addin active. Same error as before “Error opening workbook. Make sure Excel is installed.

The studio logs flag this error:

"06:57:05.6906 => [ERROR] [UiPath.Studio.exe] [1] System.IO.FileNotFoundException: Could not load file or assembly ‘UiPath.Platform, Version=20.4.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.
File name: ‘UiPath.Platform, Version=20.4.0.0, Culture=neutral, PublicKeyToken=null’
at UiPath.Studio.ObjectBrowser.Workflow.Services.ObjectBrowserWorkflowService.IsObjectReferencesDesigner(DependencyObject activityDesigner)
at UiPath.Studio.ObjectBrowser.Services.ObjectBrowserDesignerService._designerPropertyGridService_SelectionChanged(Object sender, PropertyGridInfoBarEventArgs e)
at UiPath.Shared.Events.EventExtensions.SafeInvoke[TArgs](EventHandler`1 handler, Object sender, TArgs args)

, HResult -2147024894
06:57:06.4902 => [ERROR] [UiPath.Studio.Shared.Logging.OutputLogger] [25] Excel Application Scope: Error opening workbook. Make sure Excel is installed."

Bump. Anyone have any ideas how to resolve the error: Error opening workbook. Make sure Excel is installed

I only have the win64 version of office installed. There are no win32 keys in my registry for the excel and outlook entries. I’ve uninstalled and reinstalled UIpath and office multiple times. Still this error shows when using excel integration activities.

Hy @stephensg,

Could you share your entire project file so I can take a look at it?

PS: Please tag me in your answers so I am notified when you reply.

Regards

Hi @William_Blech_Sister,

I’m getting this with the standard practice projects in the developer foundations course. I only encounter the error when using an Excel Application scope.

Demo Excel 2 (Workflow).zip (43.2 KB)

Hy @stephensg,

I have checked your workflow and did not encontered the error you mentioned.

Running out of ideas.

Check other posts on forum about this
https://www.google.com/search?sxsrf=ALeKk03G1vPmp828XSeK5055vmxc-3Ehnw%3A1592260566678&source=hp&ei=1vfnXs2YJ-6n5OUP0reA2AU&q=uipath+Excel+Application+Scope%3A+Error+opening+workbook.+Make+sure+Excel+is+installed.”&oq=uipath+Excel+Application+Scope%3A+Error+opening+workbook.+Make+sure+Excel+is+installed.”&gs_lcp=CgZwc3ktYWIQAzoECCMQJzoFCAAQkQI6AggAOgUIABDLAVC0CVjLFWDPF2gAcAB4AIABgwGIAaIHkgEDMC44mAEAoAEBoAECqgEHZ3dzLXdpeg&sclient=psy-ab&ved=0ahUKEwjN29vr8ITqAhXuE7kGHdIbAFsQ4dUDCAc&uact=5

Thanks @William_Blech_Sister,

I’ve tried all the suggestions from these posts but still receiving the error.

Just to confirm what I’ve tried:

  • Repaired office 365 - both quick and full reinstall

  • Uninstalled and reinstalled UIPath

  • Removed all win32 and win64 directories from all office Typelib registry entries

    • I performed an office quick repair after doing this and observed the quick repair rebuilt all the win64 entries.
  • Downgraded excel and outlook packages in studio

  • Tried with Visible checked and unchecked on the excel Application scope

I’ve noticed from other users who have reported this error that its slightly different each time. I’ve bolded the part which changes in mine below. Mine is flagging that the “Interface not registered” while ive seen others have “Library not registered.” or “Path not found” - what could the interface been in reference to?

RemoteException wrapping System.Exception: Error opening workbook. Make sure Excel is installed. —> RemoteException wrapping 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: Interface not registered (Exception from HRESULT: 0x80040155).
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.Helpers.ExcelHelpers.StartNewApplication()
— End of inner exception stack trace —
at UiPath.Excel.Helpers.ExcelHelpers.StartNewApplication()
at UiPath.Excel.WorkbookApplication.InitializeExcelApp()
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)

1 Like