zoukankan      html  css  js  c++  java
  • C#生成excel到其他电脑生成报表时报错

      

      错误:在本机编译过程中没有出现错误,程序能够执行。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位可能会出现其他问题,后续跟进。

  • 相关阅读:
    float的使用
    前端事件绑定
    serializeJson、serializeArray、serializeObject
    代码走查
    Colorpicker前端插件
    库/robfig/cron
    python打包
    最小公倍数 golang + python
    goland工具
    JavaScript操作JSON总结
  • 原文地址:https://www.cnblogs.com/taray/p/5291082.html
Copyright © 2011-2022 走看看