Custom Task Panes

A Custom Task Pane (CTP) is a user interface component in Office which is used to provide a non-modal window. Some of Excel’s features, such as the PivotTable field list and Reseach tool, use CTPs.   CTPs are exposed to customer extensions via the Office extensibility COM libraries. Any Excel developer can develop their own CTP and have…


How to code a .NET RefEdit Control

One of the controls frequently used by Excel is the reference edit box. This control is used to gather a range address from the user. The user specifies the range either by typing in its address or by using the mouse and clicking on the actual cells they want to use. Here’s a screenshot of the inbuilt…


Writing Custom Excel Worksheet Functions in C#

Writing our own, custom worksheet functions is a great way to extend Excel. Before Excel 2002 we developed custom functions by either writing them using VBA inside an XLA or by using C/C++ inside an XLL. Excel 2002 introduced a new type of addin called an automation addin. An automation addin enables Excel to call functions on COM objects from cells…


Open XML SDK Roadmap Announced

The new XML file formats in Office 2007 open the door to lots of exciting programmability solutions. For example, the files can be created and consumed without automating Excel.exe. This really helps server-side solutions. It also aids batch processing of Excel files and cross-platform business solutions that exchange Office files. To enable easy access to the files, we provided the…


Analysing Column Data using C# (... with a little Custom Drawing thrown in for fun)

When presented with a table of data in Excel, sometimes it is useful to be able to learn some quick facts about it. One quick fact which is often useful is the distribution of values within a particular column. For example, if we have a column called Region it is useful to  know which regions occur more often than…


Ribbon Customisation Links

I thought it would be useful to provide a list of some good articles on customising the Office ribbon: 3-part Article on Ribbon Customisation; Ribbon Developer Centre; Jenson Harris’ blog; Repurposing Commands on the Ribbon; Hiding groups of commands on the Ribbon; Adding Custom, Dynamic Menus to the Ribbon;  


Excel Event Handling in C#

After I posted about getting up-and-running with managed code and Excel, I realised that I was really writing a brief introduction to coding a C# Excel addin. Then I realised that there are two more areas that need to be covered before we would be ready to start building a proper Excel addin in C# (and…


Excel and Managed Code ... How does that work?

As well as C/C++ and VBA, I’ll be blogging a lot about managed code. So I figured it would be useful to lay out the basics of how Excel and managed code interoperate today.  If you write Excel addins you’ve probably seen articles like this one that show you how you can write your addin in C#….