Error when opening workbook

excel

#1

UiPath throws error: “Unable to open workbook. Check if Excel is installed”. Excel is installed on the computer, and all UiPath Excel activities are installed in Studio. How is this solved?


#2

Are the Excel File open? The Excel File must be closed to the activity works.

Regards :smiley:


#3

Not necessarily.
If you’re using App Integration -> Excel -> Excel Application Scope it should work with Excel open. System -> File -> Workbook needs the file closed.

I think it’s a COM error and needs reinstalling Office.


#4

Yes but if you indicate a workbook variable in App Integration -> Excel -> Excel Application Scope -> Output you can work with the same Excel file open.

@cec Are you using App Integration -> Excel -> Excel Application Scope to work with your Excel file ?


#5

I was using the App Integration -> Excel -> Excel Application Scope activity, and the Excel file was not open :slight_smile:


#6

Does it work with the Excel open?
I think it is a COM exception which I’ve seen only once. Please check the execution logs. Sometimes reinstalling Excel may help.


#7

Hi,
I am facing the similar issue.
If excel application is already open, then Excel application scope is working fine or else robot keeps on running.
When i tried to kill excel process. it is killed, but uipath is throwing an exception “Access is denied”.
I think this is because of some windows MS office patches. can we have solution for this.


#8

Hi All,

I’m working on a MacBook with Parallels Desktop. I have office 365 installed for MAC. I get the following error : "Error openning workbook. Make sure Excel is installed"
Do I need to change something in the reg. Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Or should I download the UiPath.Excel.Activities 2.0.6526.16321 ?
After download, how do I install it?

Looking forward for your advice,

Many thanks in advanced


#10

I found the solution by installing the Excel into the Window environment. Thanks


#11

Sometimes internal COM calls to excel fails. Repairing the excel installation solved the problem.


#12

first open in safe mode
excel /safe then all the files works better


#13

Try reinstalling the MS office or else disable the COM add-ins. In many cases the COM add-ins causes various errors to try disabling them and after that check if this help you to fix the issue.

Or try repairing the Excel application with the automatic utility: http://www.repairmsexcel.com/download-excel-repair.php


#14

Reinstallation/Repair office or Removing Excel COM Add-ins didn’t work. Still getting below error
OS:windows 10, MS Office 2016.

Binary has thrown an exception

Source: Excel application scope

Message: Error opening workbook. Make sure Excel is installed.

Exception Type: Exception

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: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).
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 autoSave, Boolean createNew, String editPassword)
— End of inner exception stack trace —
at UiPath.Excel.WorkbookApplication…ctor(String workbookPath, String password, Boolean visible, Boolean autoSave, Boolean createNew, String editPassword)
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)