VSTO & .NET & Excel

August 4, 2007

Adding (missing) Ribbon’s controls

Filed under: .NET & Excel, COM Add-ins, VSTO & Excel — Dennis M Wallentin @ 5:06 pm

Nowadays I primarily use Excel 2007 and I must say that I really like the Ribbon UI which I also find easy to use. Given that the focus is on end users and their ability to use Excel toolbox it’s understandable that the Ribbon and RibbonX do not support the group of developers. At least not for the 1.0 “version” of the Ribbon UI.

When I’m not using the Excel Loader I find myself many times in situations where I need to have access to the two built-in Add-ins managers (for XLAs respectively COM). They are not easy to access via the Excel Options button. Therefore I have customized the Developer’s tab enabling me to access them better when needed. Of course, it would perhaps be even better if I used keyboard’s commands to access them. 

Maybe I’m wrong but I would say that they per default should be available under the Developer’s tab.

The following image is a screenshot of the customized tab:

  

TabDeveloper

The XML for the above customization is quite simple: 

XML

Since I’m a power user of Add-in Express 2007 for Microsoft .NET I decided to create the same Ribbon customization in a managed add-in. This is done without a single line of code as the following steps will show:

Step 1 – Adding a Ribbon Tab object to the project:

ribbon.png


Step 2 – Configure the Tab

Since we don’t add a new tab to the project we instead refer to the built-in Developer’s tab:

ribbon1.png


Step 3 – Add a group to the tab

The following image shows the configuration of the added group:

ribbon2.png


Step 4 – Add controls
 

Since we want to use the built-in controls we refer to them when configure the added controls as the following image shows:

ribbon3.png

When running the managed add-in with Excel 2007 it adds the above customization. When we run the managed add-in with Excel 2003 or earlier we don’t need to take any further action to prevent it from being loaded.

I hope that I in my next blogpost can present the new and updated version of .NET Connection Tool.

With kind regards,
Dennis

7 Comments »

  1. LOL!

    Too funny. I also felt the pain point of going through Excel options to load the old Add-ins Manager. The first ribbon customization I did was to build an xlam to hold a button on the developer tab to do so. I actually did hook it to CTRL+SHFT+A as well, as I’m really lazy. It seemed to need the button though, just to be complete. 😉

    Comment by Ken Puls — August 4, 2007 @ 7:10 pm

  2. Thanks Ken 🙂

    Good to hear that I’m not the only one who miss some buttons.

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — August 4, 2007 @ 9:42 pm

  3. Hello Dennis,

    The latest Add-in Express updates include a new Ribbon Tab designer. Have a look at http://www.add-in-express.com/images/2007/adx-vsto/designers/ribbon-designer.png

    It is more comfortable than you use since it shows a preview of the tab 🙂

    Comment by Eugene — August 7, 2007 @ 5:39 pm

  4. Hi Eugene,

    Thanks for the info – highly appreciated. That’s an excellent update.

    I will download and install the latest version.

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — August 7, 2007 @ 5:59 pm

  5. Hej Dennis,

    Very nice. The Add-in Express really does look nice. I’ll really have to give this a look at some point. (I really like the work that Patrick Schmid has done for the Ribbon too.) But since the Add-in Express does more than just the Ribbon it really does look very interesting…

    Good stuff Dennis :-),
    Mike

    Comment by Mike Rosenblum — August 12, 2007 @ 6:43 pm

  6. Hej Mike,

    In many ways Add-in Express .NET is a unique development tool. A similar Ribbon Visual Design tool will first be available when VS 2008 is released.

    Having several Excel versions installed on same computer is an issue when working with .NET (as it only can handle one set of PIAs).

    Add-in Express .NET is shipped with version neutral IAs. One unofficially unsupported “feature” is that all solutions developed with it can be executed with all the installed Excel versions.

    I need to make some additional tests before I’m 100% sure but it looks very promising for this scenario.

    Sköt om dig så hörs vi mer framöver,
    Dennis

    Comment by Dennis Wallentin — August 12, 2007 @ 8:17 pm

  7. Wow, that does sound great. Very, very impressive.

    Keep it comming Dennis..! 🙂

    Comment by Mike Rosenblum — August 13, 2007 @ 9:00 pm


RSS feed for comments on this post. TrackBack URI

Leave a reply to Dennis Wallentin Cancel reply

Blog at WordPress.com.