使用Office 2002的Excel自动化应用程序 [英] Application with Excel automation using office 2002

查看:86
本文介绍了使用Office 2002的Excel自动化应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我创建了一个应用程序,该应用程序生成一个Excel报告.我使用的PC中的可用Excel版本是Excel 2002(MS Office 2002).

在UAT中,所使用的PC使用的是MS Office 2007(excel 2007)版本,并且我的应用程序在InterOp Assembly上出错.我该怎么办?请指导我.

谢谢.

Hi,

I created a application, that generates a Excel Report. The Available Excel version in the PC I used is Excel 2002 (MS Office 2002).

In UAT, the PC used uses a MS Office 2007 (excel 2007) version, and my apps is having error with the InterOp Assembly. What will I need to do? please guide me through.

Thanks.

推荐答案

问题是,每个版本的Excel都有自己的互操作程序集版本.

您可以在运行时绑定互操作,也可以沿CSV文件的方式创建内容.但是请注意,CSV不包含格式信息,因此,如果您正在寻找可以处理更多格式的内容,则可以尝试另存为XML电子表格.与CSV相比,此选项确实需要更多的工作,但是我尝试过在运行时绑定互操作时取得了更好的成功.
The problem is that every version of Excel has it''s own version of the interop assembly.

You could bind the interop at runtime, or you could create something along the lines of a CSV file. Note, though, that the CSV doesn''t hold formatting information, so if you''re looking for something which will let you handle more formatting, you can try saving as an XML spreadsheet. This option does take a good bit more work then a CSV, but I''ve had better success with it then trying to bind the interop at runtime.


这篇关于使用Office 2002的Excel自动化应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆