Excel Library not registered

1

I have a newly-bought laptop. I installed it with Visual Studio 2013, Office 2013, and Project 2013. However, when I run my app, I have an error message:

{"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))."}

What could have caused this?

excel
visual-studio-2013
ms-project
asked on Stack Overflow May 24, 2018 by Gilbert • edited Oct 15, 2019 by Cody Gray

1 Answer

1

As Ken White mentioned in the comments, the Microsoft.Office.Interop files are not part of Office 2013 or Visual Studio. They must be downloaded and installed separately. You can download the files from Microsoft's website.

If you have already installed the Microsoft.Office.Interop package and you're still receiving this error, you may need to explicitly specify the location to these files so that your application can find them. See more information in this MSDN forums thread.

answered on Stack Overflow Oct 15, 2019 by Cody Gray • edited Nov 9, 2019 by Cody Gray

User contributions licensed under CC BY-SA 3.0