c# - Can't get Microsoft.Office.Interop reference to work -
i have c# winforms app , trying open excel sheet. when try add reference microsoft.office.interop, "office" part red , says "can't resolve symbol 'office'".
when attempt build, error is:
the type or namespace name 'office' not exist in namespace 'microsoft' (are missing assembly reference?)
i have office 2012 installed, , think have primary interop assemblies installed... i'm not positive.
i know should easy, i've been looking around answer hour , can't figure out. in advance!
you need add reference project. (assuming visual studio 2010)
in solution explorer can right click on references tree , choose "add reference." choose .net tab , "microsoft.office.[...]" components. add ones need. think excel may suffice (you may have trial , error on ones).
Comments
Post a Comment