Creating Excel add-ins using the xll library

Creating Excel add-ins from scratch is not trivial, as anyone who has attempted to do so using the Microsoft Excel SDK soon realizes. A good exercise would be to download that and attempt to create your own add-in.

Back already? I can't blame you.

An xll add-in is just a dll with well-known entry points. When the add-in is opened, Excel looks for a function called xlAutoOpen and calls it. When the add-in is closed, Excel looks for a function called xlAutoClose and calls that. The job of xlAutoOpen is to register functions that can extend the functionality of Excel, while that of xlAutoClose is to unregister the functions.

The xll library provides these functions for you so you don't have to write them. All you need to do is create AddIn objects with the information Excel needs to register and unregister add-in functions and macros. Click on each class to learn more.

class description
AddIn The class for creating Excel add-in functions and macros.
OPER The variant datatype corresponding to a cell or range of cells.
Excel Calls Excel internal functions and macros.
Register Call xlfRegister with the appropriate arguments.
Args Arguments passed to Register.
FP A two dimensional array of floating point numbers.