本文共 391 字,大约阅读时间需要 1 分钟。
错误 CS1752:Interop type ‘ApplicationClass’ cannot be embedded. Use the applicable interface instead.
无法嵌入互操作类型“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,就可以了。