生成Excel文件时出现“Old Formator Invalid Type Library”的错误
2012-05-02 00:37
417 查看
生成Excel文件时出现“Old Formator Invalid Type Library”的错误
1、测试环境
操作系统:Windows 7 英文版
Office:Microsoft office 2003 英文版
2、背景
在该环境中,用我们的软件生成Excel检测报告时,发现软件出现了断言错误,提示软件出错。后来经过代码的异常捕捉,发现了这样的错误信息:“Old Format or Invalid Type Library error” 。
3、原因
网上说对于非英语语言,EXCEL不能够定为到Microsoft支持的多语言的用户界面包中(Excelcannot locate the Microsoft Multilingual User Interface Pack for thenon-English language),区域语言设置为非英语。
4、解决办法
解决办法有两种,我采用了后者。
*在该WIN7系统中,除了安装office 2003英文版外,还要再安装office 2003中文版,但是两个程序安装的路径不要相同。
*重命名
(1) 在Microsoft Office\OFFICE11文件夹中,创建一个名为“1033”的文件夹。如果存在,忽略这一步。
(2) 在Microsoft Office\OFFICE11文件夹中,找到Excel.exe程序。
(3) 拷贝Excel.exe程序到刚刚创建的MicrosoftOffice\OFFICE11\1033文件夹下。
(4) 重命名该拷贝的Excel.exe为xllex.dll。
还有一点要值得注意的是,英文版不支持中文显示,软件界面中所以的中文都会显示为乱码。如果软件中要打开文件,而打开文件的路径中出现中文,则会找不到该文件,提示错误。
1、测试环境
操作系统:Windows 7 英文版
Office:Microsoft office 2003 英文版
2、背景
在该环境中,用我们的软件生成Excel检测报告时,发现软件出现了断言错误,提示软件出错。后来经过代码的异常捕捉,发现了这样的错误信息:“Old Format or Invalid Type Library error” 。
3、原因
网上说对于非英语语言,EXCEL不能够定为到Microsoft支持的多语言的用户界面包中(Excelcannot locate the Microsoft Multilingual User Interface Pack for thenon-English language),区域语言设置为非英语。
4、解决办法
解决办法有两种,我采用了后者。
*在该WIN7系统中,除了安装office 2003英文版外,还要再安装office 2003中文版,但是两个程序安装的路径不要相同。
*重命名
(1) 在Microsoft Office\OFFICE11文件夹中,创建一个名为“1033”的文件夹。如果存在,忽略这一步。
(2) 在Microsoft Office\OFFICE11文件夹中,找到Excel.exe程序。
(3) 拷贝Excel.exe程序到刚刚创建的MicrosoftOffice\OFFICE11\1033文件夹下。
(4) 重命名该拷贝的Excel.exe为xllex.dll。
还有一点要值得注意的是,英文版不支持中文显示,软件界面中所以的中文都会显示为乱码。如果软件中要打开文件,而打开文件的路径中出现中文,则会找不到该文件,提示错误。
相关文章推荐
- Exce报表生成时出现“Workbook Add(System.Object) Message:Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_
- Excel Old format or invalid type library 错误原因
- Excel Old format or invalid type library 错误原因
- [问题解决] asp.net 中调用 Excel 出现以下提示: Old format or invalid type library.
- weblogic出现Caused by: java.io.StreamCorruptedException: invalid type code: 31错误
- mke2fs 格式化分区时出现错误 Invalid argument passed to ext2 library while setting up superblock
- [问题解决]Old format or invalid type library.
- C#:操作 Excel 异常:Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))
- Eclipse中出现错误“void is an invalid type for the variable xxx”
- Eclipse中出现错误“void is an invalid type for the variable xxx”
- Dubbo项目提交出现invalid constant type: 18错误
- js中出现TypeError: invalid 'in' operand a的错误解决
- C#:操作 Excel 异常:Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))
- BUG: "Old format or invalid type library" error when automating Excel on 64 bit server 2008
- C#Excel导出:Old format or invalid type library. (Exception from HRESULT: 0x80028018)
- 关于使用FusionCharts生成图表时出现invalid xml data错误提示的解决方法
- 关于使用FusionCharts生成图表时出现invalid xml data错误提示的解决方法
- 使用$.each方法时出现错误提示: TypeError: invalid 'in' operand a
- COMException was unhandled:Old format or invalid type library
- Office PIA:绕过Bug Q320369:Old format or invalid type library" error when automating Excel