Could not load file or assembly 'office,Version=15.0.0.0Culture=neutral,PublicKeyToken=71e9bce111e9429c.系统找不到指定的文件。。

在包和程序都正常安装了的情况下

Microsoft.Office.Interop.Excel

必须要引用

//如果是通过包安装的这个会生成

C:\Windows\assembly\GAC_MSIL\Microsoft.Vbe.Interop\15.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Excel.dll

//检查是否有这个引用,没有手动引用上
C:\Windows\assembly\GAC_MSIL\office\15.0.0.0__71e9bce111e9429c\OFFICE.DLL

posted @ 2024-05-13 13:19  HoFei1113  阅读(181)  评论(0编辑  收藏  举报