开发者

Office extension applications that can run on any version of MS Office

I want to create a MS Excel extension application which should run with any version of the MS Excel. I do not want to maintain different solutions for different versions of excel.

One solution that I am aware of it is to use the lowest supporting version interop library. For e.g. use MS Excel 2000 interop libray if that is the lowest version that you are planning to support. You can use early binding with that interop library. We can only use the features that are available with that lowest version of interop library. Also, we are assuming that 开发者_如何学Cthe newer versions will be compatible with the older versions and hence the application will work on all the newer versions.

Is anything wrong with the above solution? Are there any alternative solutions?

Note: This question specifically talks about MS Excel but it equally applies to other MS Office products like Word.


You might like to have a look at the NetOffice project: http://netoffice.codeplex.com

its a set of version-independent interop assemblies. includes also IntelliSense for each member displays which Office versions implement that member and automatic management of com proxies. For deployment, you can copy or install the assemblies with your app.


I'm not sure if they provide that kind of compatibility. They say:

"Microsoft recommends that you build a version of your add-in for each version of Office that you intend to support"

Have a look here, especially at Multiple versions of Office part.

There still are a few ways that you can go and try to achieve this, like late binding, reflection, etc. You can have a look at this question for more information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜