Functions in the Framework Library

Office 2013 and later

Last modified: July 01, 2011

Applies to: Excel 2013 | Office 2013 | Visual Studio

The Framework Library was created to help make writing XLLs easier. It includes simple functions for managing XLOPER/XLOPER12 memory, creating temporary XLOPER/XLOPER12, robustly calling the Microsoft Excel callback functions (Excel4, Excel4v, Excel12, Excel12v) and printing debugging strings on an attached terminal.

The functions included in this library help simplify a piece of code that looks like the following.

XLOPER12 xMissing, xBool;
xMissing.xltype = xltypeMissing;
xBool.xltype = xltypeBool;
xBool.val.xbool = 0;
Excel12(xlcDisplay, 0, 2, (LPXLOPER12) &xMissing, (LPXLOPER12) &xBool);

The simplified code looks like the following example.

Excel12f(xlcDisplay, 0, 2, TempMissing12(), TempBool12(0));

The following functions are included in the Framework library:






Use of these functions shortens the amount of time required to write a DLL or XLL. Starting development from the sample application GENERIC also shortens development time. Use GENERIC.C as a template to help set up the framework of an XLL, and then replace the existing code with your own.

The temporary XLOPER/XLOPER12 functions create XLOPER/XLOPER12 values by using memory from a local heap managed by the Framework library. The XLOPER/XLOPER12 values remain valid until you call the FreeAllTempMemory function or either of the Excel or Excel12f functions. (The Excel and Excel12f functions free all temporary memory before returning.)

To use the Framework library functions, you must include the FRAMEWRK.H file in your C code and add the FRAMEWRK.C or FRMWRK32.LIB files to your code project.