Excel XLL SDK

You can use the Microsoft Excel XLL Software Development Kit and the C API to create high-performance worksheet functions.
You can use the SDK to create DLLs that can integrate directly into Excel.
These DLLs have the file extension ".xll".
These DLLs provide the most direct and fastest interface for the addition of high-performance user defined functions.

link - learn.microsoft.com/en-us/office/client-developer/excel/developing-dlls 
link - learn.microsoft.com/en-us/office/client-developer/excel/excel-xll-sdk-api-function-reference
link - learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa730920(v=office.12)
link - stackoverflow.com/questions/tagged/xll?tab=Newest

Versions

There have been four versions of the SDK.
Excel 2013 - (Excel 15) Latest Version
Excel 2010 - (Excel 14 or 10.0) no longer available for download.
Excel 2007 - (Excel 12 or 8.1) no longer available for download.
Excel 1997 - (Excel or 8.0) no longer available for download.


Download

The Microsoft Excel 2013 XLL SDK contains source files for three projects.
A Framework library that is designed to speed up the writing of XLLs, and two sample projects, Example and Generic.

link - microsoft.com/en-us/download/details.aspx?id=35567 

SAMPLES\FRAMEWRK\ - Contains a project that can be built to a library, FRAMEWRK.lib, which can then be linked into other XLL projects.
This library contains a number of tools for writing XLLs easier and is used in both of the other projects in conjunction with the header file FRAMEWRK.h.
SAMPLES\EXAMPLE\ - Contains a project that can be built to an XLL, EXAMPLE.xll.
The XLL contains many examples of the use of the Framework library, and example implementations of the XLL add-in interface functions such as xlAutoOpen.
SAMPLES\GENERIC\ - Contains a project that can be built to an XLL, GENERIC.xll.
The XLL demonstrates several example functions and commands and is a good starting point for writing your own XLLs.


C API

The C API is based on the Excel 4 macro language (XLM).


Framework Library

link - learn.microsoft.com/en-us/office/client-developer/excel/functions-in-the-framework-library 

To use the this library, you must include the FRAMEWRK.H file in your C code and add the FRAMEWRK.C


Calling conventions

Any function that you want to call from Excel must include the modifier "__stdcall"


#define EXPORT cmment(linker, "/EXPORT:"__FUNCTION__"="__FUNCDNAME__") 
double __stdcall MyDllFunction(double Any)
{
#pragma EXPORT
}

Other

functions might be
* in a cell formula
* named range definition
* conditional formatting expression


functions calls from a dialog box
special considerations for:
* Paste Special, Formulas
* Replace dialog box
* Insert Function (previously called Function Wizard or Paste Function)



© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited TopPrevNext