Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading to Office 2016 Reference Error: Microsoft.Office.Interop.Excel

Visual Studio 2015 is giving me an error stating that the "Namespace or type specified in the Imports 'Microsoft.Office.Interop.Excel' doesn't contain any public member or cannot be found." I just started getting this error after upgrading to Office 2016 from 2013.

I don't have a .NET tab in my References section to add this reference. MSDN is only giving me an option to download the Primary Interop Assembly for Visual Studio 2013 and it is not fixing my issue. I still don't see the .NET tab.

How do I fix these reference errors?

like image 777
Fly Guy Avatar asked Oct 19 '15 16:10

Fly Guy


2 Answers

With Office 2016 we can now add a reference again.

Delete your existing Microsoft.Office.Interop.Excel reference.

Right click references, add reference

Select COM Search for Excel Check Microsoft.Office 16.0 Object Library Click OK

like image 161
Michael Ribbons Avatar answered Oct 12 '22 20:10

Michael Ribbons


At the Moment there's no Office 2016 PIA. You have to reinstall Office 2013 and use that Office 15 PIA 'til Microsoft has released the Office 2016 PIA.

like image 30
cbehh Avatar answered Oct 12 '22 22:10

cbehh