日期:2014-05-18  浏览次数:20662 次

C#读写excel文件的问题
对于这句代码 
Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.ApplicationClass();
总是报异常

The type 'Microsoft.Office.Interop.Excel.ApplicationClass' has no constructors defined
Interop type 'Microsoft.Office.Interop.Excel.ApplicationClass' cannot be embedded. Use the applicable interface instead.

求解。


------解决方案--------------------
http://blog.csdn.net/snlei/article/details/7190817
------解决方案--------------------
项目的引用里面 Microsoft.Office.Interop.Excel 这个引用的属性 “嵌入互操作类型” 改为 False