简体   繁体   English

MS Office Excel 2007和2010之间的兼容性

[英]Compatibility between MS Office Excel 2007 & 2010 Add in

I'd like to know if there's any way to develop, in example, an Excel add in for office 2007 that will work on office 2010? 我想知道是否有任何方法可以开发,例如,Office 2010可以在Office 2010上使用Excel? (Or a 2010 add in on 2007) (或2010年加入2007年)

How should I do that? 我该怎么办? Have you got some examples / sources? 你有一些例子/来源吗?

Have a look at this MSDN article Running Solutions in Different Versions of Microsoft Office 看看这篇MSDN文章在不同版本的Microsoft Office中运行解决方案

Basically what Microsoft say is that this is possible PROVIDED the features you use in your add-in work in both 2007 and 2010 versions of your office program(in your case Excel) 基本上微软所说的是,这可以提供你在2007和2010版本的办公程序中使用的加载项工作的功能(在你的情况下是Excel)

I'm not sure as to the scale of the project you're trying to build but from personal experience I always had to create two separate versions of the add-in to target 2007 and 2010 versions of Office 我不确定您要构建的项目的规模,但从个人经验来看,我总是必须为目标2007和2010版本的Office创建两个独立版本的加载项

Just found out that you can get the Version number from the Application object. 刚刚发现您可以从Application对象获取版本号。 I haven't had time to play around with this but I assume that you can use below in cases where the 2010 code is incompatible with 2007 and execute code for the appropriate version: 我没有时间玩这个,但我假设您可以在2010年代码与2007不兼容的情况下使用以下内容并执行相应版本的代码:

    Microsoft.Office.Interop.Excel.Application app = Globals.ThisAddIn.Application;
    string version = app.Version;

    if (version == "14.0")
    {
        //If Excel 2010 do something
    }
    else if (version == "12.0")
    {
        //If Excel 2007 do something else
    }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel Add In development,Office 2010和Office 2013的兼容性 - Excel Add In development,Compatibility of office 2010 and office 2013 可以在Office 2007中运行Excel VSTO 2010加载项吗? - Can an Excel VSTO 2010 add-in be run in Office 2007? 适用于MS OFFICE 2010 Excel的SDK - SDK for MS OFFICE 2010 Excel MS Office Visual Studio加载项,共享加载项和Excel 2010加载项有什么区别? - What's the difference between an MS Office Visual Studio Add-in, Shared Add-in, and Excel 2010 Add-in? Office 2007/2010 VSTO添加列 - office 2007/2010 VSTO add column Excel interop在Office 2007的计算机上运行,​​但在使用Office 2010的计算机上失败 - Excel interop works on machine with Office 2007 but fails on machine with Office 2010 如何在WPF中创建MS Office 2007/2010之类的工具提示 - How to create Tooltips like MS Office 2007/2010 in WPF 如何检查Excel文件是2007还是2010 Office - how to check whether excel file is of 2007 or 2010 office 如果我为Office 2007编写一个加载项,它是否适用于2010年,2013年? - If I write an add-in for office 2007 will it work for 2010, 2013? 将MS Office 2003升级到MS Office 2007导出后,Excel无法使用png图像工作 - After upgrading MS office 2003 to MS office 2007 export with excel with png image not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM