C#与excel互操作的错误无法将类型为“Microsoft.Office.Interop.Excel.ApplicationClass”的 COM 对象强制 如果您使用的电脑要操作的是office2003而之前使用过office2007使用此方法可解决您的问题 无法将类型为“Microsoft.Office.Interop.Excel.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft.Office.Interop.Excel._Application”.…
用c#进行开发时,要做一个excel导入功能,期间使用到Microsoft.Office.Interop.Excel程序集,在用vs2008开发的时候没有报错,将这个程序集引用到vs2010的时候,便报错了:interop type 'Microsoft.Office.Interop.Excel.ApplicationClass' cannot be embedded. 解决方法:点击程序集(DDL),右键-属性,将embed interop types 更改为false.…