none
VSTO and Excel2007, 2010 RRS feed

  • Question

  • Hello

    I've recently started working on a project that uses VSTO (C#) and Excel 2003.
    The project needs to support Excel2007 and later on Excel2010 as well.

    I have a few questions
    1. The project uses a document-level customization. I did manage to create a small document-level for Excel 2007, but most of the documentation I found was about Application-level Add-in. The question is has the document-level approach been abandoned?
    Should I consider switching to Application-level, if so why, what would be the advantage?
    2. The project, as it is now, does not fit Excel2007. As I mentioned it should also support Excel2010. Is the a VSTO version that allows programming for Excel2010? How different is it from VSTO 3 which supports Excel2007?
    Going back to the first question, will it be an issue using document-level in Excel2010?
    3. The project uses Visual Studio 2008 with .NET3.5, in order to support Excel2010 will I have to switch to a different version of Visual Studio and/or .NET?

    Any help would be much appreciated.
    Thank you.
    Wednesday, March 17, 2010 1:29 PM

Answers

  • for office 2010 questions, see this forum.

    I think you need to define what you need.

    Document Level customizations, are "spreadsheet applications". The spreadsheet is opened and is customized in as much as it has assemblies "built in" with it. The customization is applicable to that workbook.

    An Application Level customization is more like an excel Addin  (*.xla), not an xll. The addin adds behaviour to excel that can be applied across workbooks.

    You say you need to support Excel2003/Excel2007 and Excel2010. VS2010 does not support Excel 2003, so you are going to luck out.

    I'd be inclined to keep the Excel2003 solution, and then make a seperate 2007 or 2010. Of course there are many ways to solve a problem, so you *are* likely to hoof together something that supports them all. Resource-Budget-Time.....

    To support Excel2010 you will have to upgrade to VS2010, and then won't be able to support your Excel2003 solution in it. I keep seperate virtual machines. Saying this VS is in Beta, and Excel2010 hasn't been release yet, so who knows.




    • Marked as answer by Bessie Zhao Tuesday, March 23, 2010 2:26 AM
    Wednesday, March 17, 2010 2:37 PM
  • To respond to directly to the original poster's questions:

    1. No, document-level projects have not been abandoned. Visual Studio provides full support for both document-level and application-level project types. For documentation about document-level projects in VS 2008, see http://msdn.microsoft.com/en-us/library/bb386206.aspx.

    2. Can you describe exactly how your current Excel 2003 project does not "fit" Excel 2007? A solution that you build by using a project template for Excel 2003 will run just fine in Excel 2007 and 32-bit editions of Excel 2010 on end user computers, provided that the VSTO 2005 SE runtime is installed and other necessary deployment configurations are set up (such as Full Trust for the solution assembly, etc.). Visual Studio 2008 also provides project templates and tools (such as the Ribbon designer) for Excel 2007. If you use these projects templates, then the solution can run only in Excel 2007 and Excel 2010, not Excel 2003. If by "fit" you mean that you cannot take advantage of Excel 2007-specific features like the Ribbon or custom task panes, then yes this is by design - when you use an Office 2003 project template, your solution is bound to the features available in that version of Office.

    3. Visual Studio 2010 provides project templates and tools for Office 2007 and Office 2010. You cannot create Office solutions that will run in Office 2003 using these project templates.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Bessie Zhao Tuesday, March 23, 2010 2:26 AM
    Wednesday, March 17, 2010 10:06 PM
    Answerer

All replies

  • for office 2010 questions, see this forum.

    I think you need to define what you need.

    Document Level customizations, are "spreadsheet applications". The spreadsheet is opened and is customized in as much as it has assemblies "built in" with it. The customization is applicable to that workbook.

    An Application Level customization is more like an excel Addin  (*.xla), not an xll. The addin adds behaviour to excel that can be applied across workbooks.

    You say you need to support Excel2003/Excel2007 and Excel2010. VS2010 does not support Excel 2003, so you are going to luck out.

    I'd be inclined to keep the Excel2003 solution, and then make a seperate 2007 or 2010. Of course there are many ways to solve a problem, so you *are* likely to hoof together something that supports them all. Resource-Budget-Time.....

    To support Excel2010 you will have to upgrade to VS2010, and then won't be able to support your Excel2003 solution in it. I keep seperate virtual machines. Saying this VS is in Beta, and Excel2010 hasn't been release yet, so who knows.




    • Marked as answer by Bessie Zhao Tuesday, March 23, 2010 2:26 AM
    Wednesday, March 17, 2010 2:37 PM
  • To respond to directly to the original poster's questions:

    1. No, document-level projects have not been abandoned. Visual Studio provides full support for both document-level and application-level project types. For documentation about document-level projects in VS 2008, see http://msdn.microsoft.com/en-us/library/bb386206.aspx.

    2. Can you describe exactly how your current Excel 2003 project does not "fit" Excel 2007? A solution that you build by using a project template for Excel 2003 will run just fine in Excel 2007 and 32-bit editions of Excel 2010 on end user computers, provided that the VSTO 2005 SE runtime is installed and other necessary deployment configurations are set up (such as Full Trust for the solution assembly, etc.). Visual Studio 2008 also provides project templates and tools (such as the Ribbon designer) for Excel 2007. If you use these projects templates, then the solution can run only in Excel 2007 and Excel 2010, not Excel 2003. If by "fit" you mean that you cannot take advantage of Excel 2007-specific features like the Ribbon or custom task panes, then yes this is by design - when you use an Office 2003 project template, your solution is bound to the features available in that version of Office.

    3. Visual Studio 2010 provides project templates and tools for Office 2007 and Office 2010. You cannot create Office solutions that will run in Office 2003 using these project templates.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Bessie Zhao Tuesday, March 23, 2010 2:26 AM
    Wednesday, March 17, 2010 10:06 PM
    Answerer