I have a C# winforms app and I am simply trying to open an Excel sheet. When I try to add a reference to Microsoft.Office.Interop, the "Office" part is red and says "Can't resolve symbol 'Office'".
When I attempt to build, the error is:
The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
I have Office 2012 installed, and I think I have the Primary Interop Assemblies installed... but I'm not positive.
I know that this should be so easy, but I've been looking around for an answer to this for almost an hour and just can't figure it out. Thanks in advance!
Question TLDR: Yes. You need to have Excel installed or an exception will be thrown.
microsoft.office
in the search boxIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With