System.Runtime.InteropServices.COMException (0x80028018):
来源:互联网 发布:html href javascript 编辑:程序博客网 时间:2024/05/18 16:56
Exception(0x80028018)
分类: Excel 2011-01-13 14:04 20人阅读 评论(0)收藏举报
☆Exception种类:
System.Runtime.InteropServices.COMException (0x80028018): ライブラリの形式が古いか、または種類が無効です。 (HRESULT からの例外: 0x80028018 (TYPE_E_INVDATAREAD))
☆发生条件:
C#进行Excel出力时
☆原因:
Excel自身的一个bug,当本地系统环境被设置成非英文的,而Excel是英文的时候,就会出现
☆解决方案:
方案1.需要临时设定英文环境,代码如下:
System.Globalization.CultureInfo CurrentCI = System.Threading.Thread.CurrentThread.CurrentCulture;
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
方案2.到“区域与语言选项中”设定当前的区域选项为当前系统的环境
- System.Runtime.InteropServices.COMException (0x80028018):
- 错误:system.runtime.interopservices.comexception (0x80040154)
- System.Runtime.InteropServices.COMException (0x800A03EC)
- “System.Runtime.InteropServices.COMException”解决之道
- System.Runtime.InteropServices.COMException解决办法
- System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800AC472
- WIN7SP1 Crystal Reports异常:System.Runtime.InteropServices.ComException(0x800003E7)
- 关于system.runtime.interopservices.comexception(0x800A1066)的问题
- System.Runtime.InteropServices.COMException 6/2
- Visual Studio 2008 System.Runtime.InteropServices.COMException
- 解决System.Runtime.Interopservices.COMException问题
- 解决System.Runtime.Interopservices.COMException问题
- win7+VS2008 System.Runtime.InteropServices.COMException
- System.Runtime.InteropServices.COMException (0x80010105): 服务器出现意外情况。 (异常来自 HRESULT:0x80010105 (RPC_E
- System.Runtime.InteropServices.COMException(0x8004020F): The server rejected one or more recipient addresses.
- System.Runtime.InteropServices.COMException (0x8000401A): Retrieving the COM class factory for component with CLSID
- WIN7 C# System.Runtime.InteropServices.COMException VLC HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)
- windows server 2008 x6 System.Runtime.InteropServices.COMException (0x800A03EC)處理方法
- 1.2出栈序列统计
- 使用internal(com.android.internal)和hidden(@hide)APIs
- shell循环
- Android电源管理分析
- 什么是VIE:Variable Interest Entities
- System.Runtime.InteropServices.COMException (0x80028018):
- log4j.properties配置详解
- 手机“族群论”:十大族群背后的移动新世界
- hql中常用函數介紹
- Oracle10g ORA-32004 问题解决方案
- 动态修改web.config文件
- 骨干WLAN中的认证与密钥管理AKM操作
- 基于Visual C++6.0的DLL编程实现
- 文件的压缩与打包 linux