如何将PIA用于多个Office版本开发 [英] How to use PIAs for multiple Office Versions Development

查看:118
本文介绍了如何将PIA用于多个Office版本开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



虽然已经有了一个想法,使用PIA来释放VSTO中Office Developments的版本依赖性的限制,但不幸的是运行任何相同的结果是msgbox我下载了版本2003,2007和2010的必备PIA:



请在安装之前安装Microsoft Office 20xx产品。



此外,还没有找到任何明确的演练教程来了解使用相同的方法。换句话说,当我在我的机器上安装Office 2013和Visual Studio 2013时,如何为拥有各种Office版本(2003-2013)的同事制作一个简单的Excel加载项?



强烈要求任何一位专家通过提供这方面的工作方式或在网上推荐任何有效的信息来源来揭示最有益的方式。



提前完成。

解决方案

我很害怕,你不能;(



据我所知,VS 2010-2013不支持程序员为MS Excel 2003编写COM插件。它支持为2007及更高版本创建MS Excel插件。参见: VS2010 vs Excel 2003年加载项 [ ^ ]了解更多详情。



有几个原因:



  1. MS Excel 2007及更高版本使用 OpenXML [ ^ ]标准。
  2. MS Excel 2007及更高版本提供了向后兼容性的部分,
  3. 您可以在此处找到的其他差异列表: MS Excel 2003 vs. 2007 [ ^ ],例如:


    • 工作表中不同的行数
    • 工作表中不同的列数
    • MS Excel 2003使用CommandBars,MS Excel 2007及更高版本使用Ribbons
    • 等。






如需了解更多信息,请请参阅:

一般参考(Visual Studio中的Office开发) [ ^ ]

如何:安装Office主互操作程序集 [ ^ ]

办公室主互操作程序集 [ ^ ]

演练:为Excel创建第一个应用程序级外接程序 [ ^ ]

Excel应用程序级外接程序开发 [ ^ ]





或者,你可以写 VBA Addin [ ^ ],创建Excel添加 - 在 [ ^ ]



结论:您需要编写2个插件:一个用于MS Excel 2003,一个用于MS Excel 2007及更高版本(至少)。


Hi friends,

Although have come to have an idea to be using the PIAs to release the limitations of versions dependencies in case of Office Developments in VSTO unfortunately when I downloaded the requisite PIAs for the versions 2003, 2007 and 2010 upon running any of the same the result is a msgbox:

"Please install Microsoft Office 20xx before installing this product."

Furthermore, haven't found any clear walkthrough tutorial to be aware of the way to use the same. In other words how to make a simple Excel Add-In for my colleagues having a variety of Office versions (2003-2013) while I have Office 2013 and Visual Studio 2013 installed on my machine?

Shall highly oblige any of you experts to reveal the most beneficial manner of doing so by either providing a way to work in this regard or recommending any valid source of info on net for the same.

Thanx in advance.

解决方案

I'm afraid, you can't ;(

As far as i know, VS 2010-2013 does not supports programmers to write COM addin for MS Excel 2003. It supports creation of MS Excel addin for version 2007 and higher. See: VS2010 vs Excel 2003 add-in[^] for more details.

There are several reasons:


  1. MS Excel 2007 and higher uses OpenXML[^] standard.
  2. MS Excel 2007 and higher provides the part of backward compatibility,
  3. the list of other differences you'll find here: MS Excel 2003 vs. 2007[^], for example:

    • different count of rows in sheet
    • different count of columns in sheet
    • MS Excel 2003 uses CommandBars, MS Excel 2007 and higher uses Ribbons
    • etc.



For further information, please see:
General Reference (Office Development in Visual Studio)[^]
How to: Install Office Primary Interop Assemblies[^]
Office Primary Interop Assemblies[^]
Walkthrough: Creating Your First Application-Level Add-in for Excel[^]
Excel Application-Level Add-in Development[^]


Alternatively, you can write VBA Addin[^], Creating an Excel Add-in[^]

Conclusion: You need to write 2 addins: one for MS Excel 2003 and one for MS Excel 2007 and higher (at least).


这篇关于如何将PIA用于多个Office版本开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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