Error opening workbook. Make sure Excel is Installed. (Interface not registered)

Yes, I have checked all the other “Error opening workbook, make sure excel is installed” posts and they all didn’t work for me. I found a solution to my issue and wanted to share it, hoping that it helps someone else, because dammit - it took me DAYS to resolve this issue and I haven’t seen it anywhere else on this forum.

Disclaimer:
I cannot take credit for this solution, because I found it here: UiPath - issue - "Make sure Excel is installed.the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: In " - coco1989 - 博客园

and here: FAQs COM Errors · phw198/OutlookGoogleCalendarSync Wiki · GitHub

I’m simply writing it down for ease (also, I can’t read chinese so I had to google translate that and figure out what to do, this is to help those who can’t too) I’m not a computer expert so I highly recommend you try all other options before attempting this. Some solutions can be found here: I get an: Error opening workbook. Make sure excel is installed - #2 by Corneliu_Niculite

Please please PLEASE be careful if you’re editing the registry.

The Issue:

Error opening workbook. Make sure Excel is installed.

Exception Type: System.Exception

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: Interface not registered (Exception from HRESULT: 0x80040155).

***Take note of “Interface not registered” under the registry key {000208D5-0000-0000-C000-000000000046}. If you have a different registry, but the same error “interface not registered” , this may help you.

What happened prior:
I had Microsoft Office 2013 on my laptop. Didn’t uninstall it, but instead, installed Microsoft 365 over it. (slow clap for myself ya) Installed UiPath. Excel Application Scope wasn’t working. Frustration sets in.

What solutions I tried:

What I did:
The registry key mentioned in the exception is IMPORTANT. Take note of that. My issue was with {000208D5-0000-0000-C000-000000000046} hence in putting that down in the solution. Replace the registry below with the one mentioned in the Excel exception.
(fyi, i got the wordings for the solution here, but for a different context: FAQs COM Errors · phw198/OutlookGoogleCalendarSync Wiki · GitHub)

Part 1: Fix the Interface
a. Access the Windows Registry Editor via Start>Run>Type Cmd and Enter > Type RegEdt32 and Enter .
b. Navigate to the key that exist (depends on if using the 32 or 64 bit version of Outlook/Windows):

  • HKEY_CLASSES_ROOT\Interface\{000208D5-0000-0000-C000-000000000046}\TypeLib
    (the solution in github uses something different, but I found mine here)

Take note of the version number AND the value that is stated on the right hand section. In my case it is {00020813-0000-0000-C000-000000000046} and Version 1.9

Part 2: Fix the TypeLib
a. Navigate to HKEY_CLASSES_ROOT\TypeLib\{00020813-0000-0000-C000-000000000046}
(if yours isn’t {00020813-0000-0000-C000-000000000046}, replace with whichever value is found in part 1)
b. Delete the version keys for any version of that is not installed on your system. You should KEEP THE VERSION that matches part 1. In this case, I’m keeping 1.9 and deleting ANY OTHER values, if there are any. Please please please be careful when deleting things here


c. Make sure that the registry key value ending with EXCEL.EXE is pointing to a valid file location. The key location should be something like HKEY_CLASSES_ROOT\TypeLib\{00020813-0000-0000-C000-000000000046}\1.9\0\Win64

Take note of the EXCEL.EXE path, you’ll use it later.

(Side note: If you have both Win 32 and Win 64 keys, that may be the issue. Gotta delete the one you don’t need. Solution here: Excel application scope : Error openning workbook. Make sure Excel is installed - #43 by adorp
Also, if the location of EXCEL.EXE isnt valid, that is another issue. Solution here (open another link to VS site): I initially had an issue with excel not opening ("System.Exception: Error opening workbook. Make sure is installed’’), however after some searching I managed to resolve the issue - #3 by Leon_Bruce_Chuttergoon)

Part 3: Ensure ‘EXCEL.EXE’ is Registered
We now need to make sure that file is properly registered.
a. Download regtlibv12.exe to your computer
b. Go the Windows Start Menu and type cmd .
c. In the search results, right-click cmd.exe and select Run as Administrator...
d. Change directory to where you downloaded regtlibv12.exe , eg: cd %USERPROFILE%\Downloads
e. Execute the following command, where <EXCEL.EXE> is the value taken from part 2:
regtlibv12.exe "<EXCEL.EXE file>" .
For example:
regtlibv12.exe "C:\Program Files\Microsoft Office\Root\Office16\EXCEL.EXE"

anddddd try using excel application scope again after that.

Those were the steps that I took and I sure hope it (or the other links I posted) helps someone else too. Like I said, I’m no professional here, so please be careful when making edits. Cheers yall.

tl;dr making sure excel is installed properly shouldn’t be as hard as it is.

For me, I am using Windows 10 Insiders edition along with Microsoft 365. The Excel access sometimes stops working after I update Windows or Microsoft 365.

Here is what I do to fix this:

  1. Click Start ->Programs & Features

  2. Search for Microsoft 365

  3. Right click on Microsoft 365 then choose Online Repair

  4. Grab some coffee, this may take a while (look for a window that says (Please stay online while Office Downloads). Note: window may be hidden behind the Program s and Features window.

  5. Maximize the “Please Stay online…” window by double clicking the invisible title bar (cannot be seen but it is in the top portion of this window). Wait for the job to finish. It takes about 5-20 minutes (for me)! On finish you will see the “You’re all set!” message at the bottom of the window. You won’t see this message unless the window is maximized!

  6. Click Close to exit the Microsoft Office 365 repair window.

That’s it!