Since 3 days I've been trying every link I find on the issue, but always get the "CS0234: The type or namespace name 'Office' does not exist in the namespace 'Microsoft'" error. I need to convert Excel to PDF in c#.
This is my set-up:
- Windows Server 2012 R2
- Office Professional Plus 2010 (in Spanish! That should not be a problem though?!)
- Microsoft Office 2010 Primary Interop Assemblies
- Microsoft Visual Studio Express 2015 for Web
I won't see Microsoft.Office.Interop.Excel among the Assemblies under .NET; trying to find a way, I added the "Microsoft Excel 14.0 Object Library" to my project which made the "Microsoft.Office.Interop.Excel" reference at least appear in the list. But that dll points to C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Excel\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Excel.dll and seems to be useless as the error remains. I reinstalled everything several times and updated VS Express for Web from 2013 to 2015.
I read somewhere (Can I still use Microsoft.Office.Interop assemblies with office 2013?) that PIAs are considered a historical artifact and that one can do without. That was only more confusing and didn't help.