A Wrapper for the Excel API

Version History

XLW UPDATE - 8 Aug 2020

XLW is now being updated and developed on at xlw at GitHub

Future packages will be released as nuget packages

Release 5.0.2 - 13 December 2014

  • Added support for Visual Studio 2013

Release 5.0 Final - 4 February 2013

  • Version 5.0.0 finally released, after a very length alpha process fixing numerous bugs
  • Added support for Excel 2010
  • Added support for 64 bit addins
  • Added support for Visual Studio 2010 and 2012
  • Added support for auto-generated help for addins using Sandcastle
  • Richer set of example and improved documentation

Release 4.0 Final - 24 September 2009

  • Version 4.0.0 finally released, after 11 months in development

50,000 Downloads - 13 September 2009

  • On Sunday, 13th September 2009, the total number of downloads from XLW's project page on Sourceforge hits 50,000
  • The month of September 2009 saw the second highest number of downloads in 7 years of XLW being hosted on Sourceforge, second only to September 2005

Release 4.0 Beta 2 - 16 August 2009

  • Extended for .NET to allow implementing od worksheet functions in C# and VB.NET
  • New installer able to detect supported installed development environments
  • Template projects added to allow easy creation of new XLL projects
  • Support added for the Code::Blocks IDE (MinGW)
  • Upgrade MinGW dependency to GCC4.4.0

Release 3.0 Final - 11 May 2008

  • Extend class XLFunctionRegistrationHelper to allow function return type default value (XlfOper) to be overridden
  • Update the handwritten example to use XLFunctionRegistrationHelper instead of XlfArgDesc/XlfFuncDesc

Release 3.0 Beta - 14 April 2008

  • Introduce support for Excel 2007, including the XLOPER12 datatype, multithreaded worksheet functions, UNICODE strings, long strings, and larger spreadsheets
  • Class XlfOper wraps either XLOPER or XLOPER12 depending on version of Excel detected at startup
  • Classes XlfOper4 and XlfOper12 specifically wrap XLOPER or XLOPER12 respectively, avoiding performance overhead incurred by class XlfOper
  • Ensure thread safety as required to support multithreaded worksheet functions under Excel 2007 - introduce new mutex class for this purpose - new tag <xlw:threadsafe for InterfaceGenerator
  • Represent Excel parameter type codes as std::string rather than char, because Excel 2007 introduces codes comprising multiple characters
  • Extend the support for datatypes to allow function inputs of type XlfOper to be registered with Excel as either P/R (OPER/XLOPER) or Q/U (OPER12/XLOPER12)
  • Add support for boost matrix class (thanks to Tim Brunne)
  • Introduce support for sheet-level references (xltypeSRef)
  • Extend support for arrays (xltypeMulti). An explanation of the new interface is included in the documentation for the XlfOper class.
  • Implement routine to unregister functions from Excel - this uses a technique published by Laurent Longre to work around a bug in the Excel C API
  • Put all classes in new namespace xlw
  • Store string length in a variable of type unsigned char (BYTE) rather than int, to fix a problem in which strings longer than 128 bytes were processed incorrectly
  • Implement workaround for Excel bug in which parameter descriptions are corrupted in Function Wizard
  • Multiple minor bug fixes
  • Implement new VC NMAKE project RunInterfaceGenerator to detect changes in the inputs to InterfaceGenerator and rerun the utility as necessary
  • Reintroduce the example application that accompanied XLW version 1
  • Drop support for VC6, introduce support for VC9, update support for VC7, VC8, and Dev C++
  • Update documentation, fix broken links, reorganize website

Release 2.1 - 22 April 2007

  • Calculate elapsed run time for functions. <xlw:time command for InterfaceGenerator.
  • Support for empty argument lists.
  • Extended support for types other than XLOPER, e.g. K for matrix of doubles.
  • Bugfixes, updates to documentation and examples

Release 2.0 - 18 December 2006

This is an extension to the XLW project by Jérôme Lecomte. Changes are copyright © 2006 Mark Joshi with the same licence as for the original XLW. Major new features:


  • Automatic generation of interface file.
  • Registration code done at point of function declaration.
  • Improved error catching, strings, const char* and run_time errors used to pass strings back to excel containing an error message.
  • Conversions from XlfOper routines throw strings identifying the bad argument.
  • XlfOpers adapted to work with data types CellMatrix and MyMatrix for both input and output. CellMatrix allows each cell to be of type string, number, boolean or error, or empty.
  • Works with Visual Studio 6, 7, and 8 and DevCpp 4.9.9.2, project files included.
  • Ability to add type registrations.

Release 1.2.2 - 7 March 2003

  • xlwExample/xlwExample.xls: Added recalcPolicy to let user register function as volatile (unconditionally recalculated). Note that default is still not volatile
  • TODO.txt: fixed since 1.2
  • xlw.dsp: english version of the dsp
  • xlwExample/xlwExample.vcproj: libXLL added
  • xlwExample/xlwExample.mak: updated version number
  • xlwExample/xlwExample.cpp: Merged update made for R010200f0
  • xlw/XlfOper.cpp: Removed PORT_USING(std) in header. Various documentation fixes
  • Docs/images/doxygen.png: Fixed file corruption due to ascii manipulation
  • Docs/xlwfooter.html: better proportions
  • xlw/XlfExcel.h: Removed reference to log and ofstream
  • xlw/EXCEL32_API.h: Updated version number to 010200f0
  • Docs/pages/install.txt: Updated doc for new download link, new features and updated xlwExample.cpp
  • ChangeLog.txt: Mainly documentation fixes
  • Docs/images/doxygen.png: Added doxygen logo
  • Docs/pages/history.txt: Updated
  • Docs/xlwfooter.html: Merged last minute changes that were made to HEAD
  • Docs/xlwfooter.html: Now points to images directory. Refences new doxygen.png
  • xlwExample/xlwExample.dsp: Copies xll and debug information to the $BIN directory (assumed to be defined)
  • xlw.dsw: Dependency flag helps in OnTheEdge build and does not hurt for other builds
  • xlw/EXCEL32_API.h: Update for release 1.2.0a
  • xlw/XlfOper.inl: Simplified interface: ConvertToXXX is now private, AsXXX now takes an int to store the error code. If the pointer is null an exception is thrown
  • xlw/XlfOper.h: Moved test for auxiliary memory from XlfOper to XlfExcel. Cleaned up
  • xlw/XlfExcel.h: Added IsCalledByFuncWiz
  • xlwExample/xlwExample.xls: Added IsInWiz to demonstrate XlfExcel::IsCalledByFuncWiz
  • xlwExample/xlwExample.cpp: Amended IsInWiz to demonstrate how to retrieve the caller cell
  • xlw/XlfOper.cpp: Fixed memory leak thanks to Ale
  • xlw/XlfOper.h: Fixed deletion of MS Excel data
  • xlw/macros.h: Moved static error OPER constructor to XlfOper
  • xlw/XlfOper.inl: Added ThrowOnError and Error. Added documentation
  • xlw/XlfExcel.inl: Moved ThrowOnError to XlfOper. Made XlfBuffer private. Got rid of XlfExcelDestroyer (use xlAutoClose instead) and IsInitialize Added documentation
  • xlw/XlfOper.h: Fixed big memory leak (forgot it in previous version's log). Got rid of unneeded boolean parameter
  • xlwExample/xlwExample.cpp: Fixed small memory leak
  • xlwExample/xlwExample.cpp: Simplified Stats function to take advantage of AsDoubleVector
  • xlw/XlfOper.h: Added policy argument to AsDoubleVector and ConvertToDoubleVector. Defaults is to generate an error if the range is not 1d
  • xlwExample/xlwExample.xls: added "what's changed"
  • xlw.nsi: removed Borland distribution
  • xlwExample/xlwExample.mak: makefile updated
  • xlw/XlfOper.h: Added (should be) throw free ConvertToDoubleVector. Updated logging to use std::cerr
  • xlwExample/xlwExample.cpp: Updated logging to use std::cerr. Uses std::vector instead of double[]
  • xlwExample/Win32StreamBuf.inl: Updated logging to use std::cerr
  • xlw/XlfExcel.inl: Made allocation engine more intelligent. Updated logging to use std::cerr and removed old logging methods (did not work)
  • xlw.dsp: Removed ERR_Macros.h
  • xlwExample/xlwExample.dsp: Added Win32StreamBuf
  • xlw/XlfOper.h: added XlfOper.AsDoubleVector()
  • xlw/XlfOper.h: When buffer is full, don't throw any exception, sets lpxloper_ to 0 instead. Changed other method to check for xloper_
  • xlw/XlfRef.h: Documention change
  • xlwExample/xlwExample.cpp: Reverted to v.1.3 The FreeMemory calls should not be necessary
  • xlw/XlfRef.inl: Changed XlfRef implementation to handle ranges in external sheets
  • xlw/XlfOper.cpp: Added XlfOper::ConvertToXXX (to be exception free)
  • xlw/XlfExcel.h: Changed buffer default size to 65K. Moved xlret error handling to ThrowsOnCriticalError.
  • xlwExample/xlwExample.cpp: Added FreeMemory calls to allow many function registrations
  • xlw/XlfOper.h: Added (to be) exception free XlfOper::ConvertToXXX functions
  • xlwExample/xlwExample-mingw32.mak: Jose Fonseca fixes for MINGW32
  • xlwExample/xlwExample-mingw32.mak: Jose Fonseca fixes for MINGW32
  • xlw/XlfException.h: Jose Fonseca fixes for MINGW32
  • xlwExample/xlwExample-mingw32.mak: Jose Fonseca fixes for MINGW32\nthe config.mgw.h file is still missing
  • xlw/XlfOper.h: Jose Fonseca fixes for MINGW32
  • xlw/XlfException.h: Jose Fonseca fixes for MINGW32
  • TODO.txt: adding Jose Fonseca to the contributors list
  • xlw/port.h: Jose Fonseca fixes for MINGW32\nthe config.mgw.h file is still missing
  • xlwExample/xlwExample.mak: reversed logic from XLW_NOIMPORTEXPORT to XLW_IMPORTEXPORT
  • xlwExample/xlwExample.mak: removed project dependencies: they make makefile not portable
  • xlwExample/makefile.mak: improved parametrization of debug trailing identifier in Borland makefiles
  • xlw/EXCEL32_API.h: version up to a2
  • xlwExample/xlwExample.mak: removed dependencies
  • xlwExample/xlwExample.mak: project setting fixed
  • xlw.nsi: added Borland support
  • Docs/makefile.mak: removed winhelp from the all target
  • xlw/config.msvc.h: excel32 renamed xlw
  • xlw.nsi: correct version number
  • test/main.cpp: new license
  • Docs/pages/misc.txt: modified to have correct PDF output
  • Docs/pages/excel32.txt: dummy commit
  • Docs/pages/bibliography.txt: modified for correct PDF output
  • xlw/xlcall32.h: switched to verbatim BSD license
  • xlw/macros.h: added default catch (...) {} Temporary removed try/catch from xlAutoOpen()
  • xlw/config.msvc.h: changed _d into d (degub version of the library)
  • xlw/xlcall32.h: project restructuring

Release 1.2.0 - 7 July 2002

  • Buffer is not fixed in size anymore but extend as needed by the functions registered in Excel. Growing policy is still subject to change but it should not impact user interface.
  • Logging method in XlfExcel have been phased out. All error information now sent to cerr stream. Users can redirect cerr to the console of their choice as demonstrated in xlwExample.
  • Methods AsXXX() now takes a pointer to an integer which defaults to 0. If an error occurs in the API call, the integer is set to the error code returned by Excel. If the pointer is 0, an exception is thrown.
  • New AsDoubleVector() return the value in the range in a vector.
  • (BUGFIX) XlfRef correctly handles ranges in a different worksheet than the active one.
  • Added new method IsCalledByFuncWiz.
  • XlfExcel singleton does not destroy itself anymore (or did it ever ...). It is recomended to implement xlAutoClose as shown in xlwExample.

Release 1.1 - 11 April 2002

  • Added nsi file for Win32 installer generation. The installer also set the environment variable XLW_DIR pointing to your xlw installation folder. This way any project based on xlw can add "$(XLW_DIR)" to the "Additional include directory" list and add "$(XLW_DIR)\lib\Win32\VisualStudio\" to the "Additional library path" list.
  • Renamed library as xlw.lib
  • Moved sources under xlw folder, and switched to <xlw/xxx.h> inclusion style (library suggested standards, at least by GNU)
  • Added LICENSE.TXT, NEWS.TXT, AUTHORS.TXT, CONTRIBUTORS.TXT, HISTORY.TXT, ChangeLog.TXT, and README.TXT files in the project root
  • Moved test file xlwExample.cpp under xlwExample folder
  • Added config.msvc.h to handle all the MS VC defines. Now as long as you include <xlw/xlw.h>, you won't have to explicitly link your application to xlw.lib. This is automatically done by xlw.h using the pragma statement:
  •       #ifdef _DEBUG
              #pragma comment(lib,"xlwd.lib")
          #else
              #pragma comment(lib,"xlw.lib")
          #endif
    
  • Visual Studio setting changed from Multithread to Multithread DLL
  • Added two VC++ build configurations. The "Win32 OnTheEdgeRelease" and "Win32 OnTheEdgeDebug" configurations are equivalent to "Win32 Release" and "Win32 Debug" respectively, except that they do not use the installed xlw libraries, but look for the *.h, *.inl, and *.lib xlw files in a relative ..\xlw path. This is mainly for xlw developers, to allow them to check the examples without having to install their unstable working version of xlw. The "OnTheEdge" approach may be adopted in projects using xlw, allowing for a quick and easy way to check how the projects work with a new xlw release without having to install it.
  • Error handling polished in accord to C++ standard
  • Modified EXCEL32_API.h
  • Purged port.h of unnecessary defines
  • Introduced XLW_HEX_VERSION and XLW_VERSION
  • Added config.bcc.h for Borland CPP defines
  • Compiled xlw under borland (it doesn't work yet)
  • The library debug version is called xlwd.lib
  • xlwExample uses XLW_DIR environment variable to detect xlw installation
  • xlwExample doesn't link xlw.lib anymore
  • doxygen.cfg renamed as xlw.doxy, moved under Docs folder, and modified in order to account for the Docs folder
  • Updated to doxygen 1.2.14
  • All *.txt documentation pages moved under Docs folder
  • Added CVS Id tag to all files

Release 1.0 - 28 January 2002

Initial release by Jérôme Lecomte (xlw@ifrance.com)