Excel application scope : Error openning workbook. Make sure Excel is installed

excel
activities

#22

Hey @jakubvanhara

This activity can only be used if the Microsoft Excel application is installed on your machine.
Because the Excel application scope activity uses “Microsoft.Office.Interop.Excel.dll”.

You need to have Microsoft Excel installed in order to have access to the Introp libraries.

To use the features of a Microsoft Office application, we need to use the primary interop assembly (PIA) for the application. The primary interop assembly enables managed code to interact with a Microsoft Office application’s COM-based object model.
To apply PIA that can obtain the reference to interop with excel in your program, you have to install Excel.

Regards…!!
Aksh


#23

Hello and thank you! I have forgotten to mention that I used ReInstall so Excel (and entire Office package) is on my pc (and was before, as well)

br
Jakub


#24

Your Office Version?


#25

MS Office 365 ProPlus
Version: 1705


#26

Hi, I am working on a sequence which includes an Excel application scope to launch excel. I get a “sequence has thrown an exception” error “Error opening workbook. Make sure Excel is installed”.

I do have Excel installed (2010) , and I have defined the workbook path in the scope.

I checked the packages and Uipath.Excel.Activities is installed.
The file I want to open is an xlsm file
Any ideas?


#27

Hello,
Always no solution to this issue ?
Excel is correctly installed but we get alternatively “The remote procedure call failed. (Exception from HRESULT: 0x800706BE)” or “Error opening workbook. Make sure Excel is installed”
We need a real solution to this issue.
Thanks


#28

Try to repair the Microsoft Office 2016

• Right-click the Start button (lower-left corner), and select Apps and Features on the pop-up menu.
• Select the Microsoft Office product you want to repair, and select Modify.
• Depending if your copy of Office is Click-to-run or MSI-based install, do the following.
Click-to-run
In How would you like to repair your Office Programs, select Online Repair to make sure everything gets fixed, and then select Repair. (The faster Quick Repair option is also available, but it only detects and then replaces corrupted files.)
MSI-based
In Change your installation, select Repair and then click Continue.
• Follow the instructions on the screen to complete the repair.


#29

I had the same issue, try to complete uninstall MS office and UiPath.
Then install the MS office again and then uipath. It should work.


#30

@Strajk
Yes, it helped with this kind of issue!
Also, make sure you are running all as administrator


#31

Thanks. Your comments helped me to solve my problem.


#32

This worked for me. Thank You!


#33

Main 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: 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 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)


#34

Hello All!

-I spent about 2 hours trying to deal with this issue.
-I was able to resolve by doing the Complete Online Fix of MS Office and then a restart.
-Cheers!

Matt


#35

Great!! It worked for me!!


#36

Hey @aksh1yadav, I’m not able to read the .xls files using Workbook Read Range Activity. How can we read such files without depending on Excel Application Scope activity?

I try to read the .xls files using OLEDB provider but I’m able to read only .xlsx files.