Compatibility between MS Office Excel 2007 and 2010 Add to

I would like to know if there is a way to develop, for example, Excel for Office 2007 that will work in Office 2010? (Or add 2010 in 2007)

How can I do it? Do you have some examples / sources?

+4
source share
1 answer

Take a look at this MSDN article Running Solutions in Different Versions of Microsoft Office

Basically, Microsoft says that it’s possible PROVIDED functions that you use in your add-in work in versions of your office program 2007 and 2010 (in your case, Excel)

I'm not sure about the scale of the project you are trying to build, but from personal experience I always had to create two separate versions of the add-in for the target versions of Office

2007 and 2010 years.

It just turned out that the version number can be obtained from the Application object. I did not have time to play with this, but I assume that you can use below in cases where the 2010 code is incompatible with 2007 and runs the code for the corresponding version:

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 } 
+3
source

Source: https://habr.com/ru/post/1390376/


All Articles