taray

  

  错误:在本机编译过程中没有出现错误,程序能够执行。Copy出编译程序以及所需要的一些Dll文件,放在另一台机子上出现以下错误
System.InvalidCastException: Unable to cast COM object of type \'Microsoft.Office.Interop.Excel.ApplicationClass\' to interface type \'Microsoft.Office.Interop.Excel._Application\'. This operation failed because the QueryInterface call on the COM component for the interface with IID \'{000208D5-0000-0000-C000-000000000046}\' failed due to the following error: 不支持此接口 (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

  

 

 

  解决方案:可能是报错的电脑office软件不匹配,遂下载了现在比较常用的wps装上,重新运行生成excel成功。

  这是在win64位系统3台电脑上运行,如果在win32位可能会出现其他问题,后续跟进。

分类:

技术点:

相关文章: