[Solved]UiPath.Excel.ExcelException

Hi there, this is a rookie speaking.
I encountered this error code even after generating the repair plan.
Any thoughts on the reasons for the failure?

Full Error Code:

22.10.2+Branch.master.Sha.6a1a7800a9c5060f3750feb636f040a065e6579a

Source: Use Excel File

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

Exception Type: UiPath.Excel.ExcelException

UiPath.Excel.ExcelException: Error opening workbook. If Excel is installed, run the ‘Repair Tool for Microsoft Office Interop’ from the Tools tab on the Home screen. ---> System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' 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: 元素找不到。 (0x8002802B (TYPE_E_ELEMENTNOTFOUND)).   at UiPath.Excel.Helpers.ExcelInteropHelpers.GetNewComApplication()
	--- End of inner exception stack trace ---
   at UiPath.Excel.Helpers.ExcelInteropHelpers.GetNewComApplication()
   at UiPath.Excel.Helpers.ExcelInteropHelpers.StartNewApplication(ExcelStartOptions options)
   at UiPath.Excel.Helpers.ComApp.ExcelSingleComAppManager.StartOrAttach(ComAppOptions comAppOptions, ExcelStartOptions excelStartOptions, Boolean& wasAlreadyRunning)
   at UiPath.Excel.ExcelProcessFactory.<>c__DisplayClass6_0.<GetProcess>g__GetProcessLazy|1(String filePath, Boolean onlyIfExists)
   at UiPath.Excel.ExcelProcessFactory.<>c__DisplayClass6_0.<GetProcess>b__3(String filePath)
   at UiPath.Excel.ExcelProcess.GetComWrapperForFilePath(String filePath, Boolean& wasAlreadyRunning)
   at UiPath.Excel.ExtendedWorkbookFactory.Create(Boolean attachOnly)
   at UiPath.Excel.WorkbookQuickHandle.SafeGetWorkbook(Boolean attachOnly)
   at UiPath.Excel.WorkbookQuickHandle.OpenWorkbook()
   at UiPath.Excel.Activities.Business.ExcelApplicationCard.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)

Excel version:
Microsoft 365 64 bit

Thanks in advance!

HI @_B24081338

Welcome to Uipath community

Have tried with Workbook activities

image

Regards
Gokul

1 Like

Hi @_B24081338 try with workbook activities instead of excel activities.

@Gokul001 @Tapan_Behera1
Thank you so much! It works!

Great @_B24081338

Kindly mark the post as solved. It will help for other too.

Regards,

For those who encounter the same error code,
the followings are the details of my original attempts and the revision.
Hope these help :slight_smile:

Goal:

Extract data from yahoo finance and append data into an excel file

Original Attempts:

Use Excel File → Use Application/Browser → Extract Table Data

Error Code
Source: Use Excel File

Revision

Use Application/Browser → Extract Table Data → Append Range Workbook

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