Error in Excel 2010 when using Excel activities

ExcelError

Getting the below error after downgrade to 2010 from 2013, in Excel Application scope
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Exception: Error opening 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.StartNewApplication()
— End of inner ExceptionDetail stack trace —
at UiPath.Excel.WorkbookApplication.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)

Tried below:

  1. re-install of Office 2010
  2. reinstall studio
  3. remove and add excel activities packages
  4. checked the registry (no multiple versions of excel is present)

I have a 64 bit machine and 32 bit office installed, could this be causing issue? Few posts mention that 32 bit folder should be removed from Registry. But my version of office is 32 bit, is that to be removed?

Please suggest any fix to this issue.

Did we try with workbook activities
Like we can directly use READ RANGE form workbook activity or even WRITE RANGE

And kindly have a view in this link
I find few command helpful

Cheers @priya.pai

1 Like

workbook activities are not suitable for my requirement. I need the excel activities itself

May I know why so
Cheers @priya.pai

I need to open a specific excel file, copy the data in one sheet and paste to another sheet. this is because there are formulate in the target excel file.

Can you let me know which version of office you have in your machine @priya.pai?

Here is a URL from my bookmarks for the same issue :smiley:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/08f13e9d-895c-4102-b6d9-e327af8cf8c0/0x80029c4a-typeecantloadlibrary?forum=vsto

3 Likes


this is what I find in my registry. Can the 1.8 folder be removed safely or not?

After removing the key 1.8, the error is no longer appearing!

reference: https://help.innowera.net/PR2008/2.00/index.htm?resolve_type_e_libnotregistered_error.htm

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