Interop type 'Microsoft.Office.Interop.Word.ApplicationClass' cannot be embedded. Use the applicable
錯誤信息:
Interop type 'Microsoft.Office.Interop.Word.ApplicationClass' cannot be embedded. Use the applicable interface instead.
翻譯:
無法嵌入互操作類型“Microsoft.Office.Interop.Excel.ApplicationClass”。請改用適用的接口。
解決方法:
In your Project, expand the "References", find the Microsoft Office Interop reference. Right click it and select properties, and change "Embed Interop Types" to false.
翻譯:
解決辦法是將引用的DLL:Microsoft.Office.Interop.Excel;的嵌入互操作類型改為false,就可以了。
如下圖:
最後更新:2017-04-03 12:55:50