Dmitry Kostochko

Video HowTo: Create an Excel COM add-in in Visual Studio

This sample starts the new series of visual HowTo. We thought it would be a good idea to give you a sort of hands on training with Add-in Express.

Today we are going to look at one of the most frequent tasks, creating a COM add-in for Microsoft Office. We will start from the very first steps, such as creating a COM add-in project for MS Excel, and we will show you how to:

  • Add a ribbon tab with ribbon group and ribbon button in Excel 2007
  • Add a toolbar with a single button for Excel 2000-2003
  • Handle those buttons clicks
  • Add a custom task pane to Excel 2007
  • Handle a keyboard shortcut

This sample video was captured in Visual Studio 2008 (VB.NET) with Add-in Express 2009 for Microsoft Office and .net . In a similar way you can develop your Excel add-in in C#, C++.NET and Delphi Prism. You can find the complete description of this Excel sample on our web-site.

You may also be interested in:

How to build a COM add-in for Excel, Word and PowerPoint
How to develop an Outlook COM add-in step-by-step

3 Comments

  • Yuri says:

    Thanks for getting back into Excel world :) One thing I would suggest to include is how to make an add-in that with both UI and user defined functions (UDFs) – a very common scenario in the world of finance. Typically GUI will help users enter some obscure parameters for UDFs – offer an app-specific function wizard.

    Both UDFs & UI must reside inside the same AppDomain (that was a major issue before your XLL project) as they most likely will share considerable state.

  • Dmitry Kostochko (Add-in Express Team) says:

    Thank you for your feedback. The problem is that it’s hard to load a UDF into the same AddDomain in which an Excel COM add-in resides. It is possible in very simple scenarios, but I cannot give 100% guarantee it will work properly in all cases. That is why we recommend using XLLs instead of UDFs.

  • Joon Nan says:

    Wonderful tutorial!

Post a comment

Have any questions? Ask us right now!