Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XLL Excel addin in unmanaged C++

I have a few mathematical simulations in unmanaged C++ and now I need to integrate them with Excel (so that it is possible to call the functions from Excel and get the values back). I don't want to use any VBA, so I guess I have to implement an XLL addin. I would like to use as few third party additional frameworks as possible. Could someone point me to a good tutorial?

like image 298
Grzenio Avatar asked Jun 09 '11 10:06

Grzenio


People also ask

How to add XLL to Excel?

XLL files can be opened with Microsoft Excel. If double-clicking an XLL file doesn't open it in Excel, you can do it manually via the File > Options menu. Select the Add-ins category and then choose Excel Add-ins in the Manage drop-down box. Choose the Go button and then Browse to locate it.

How to generate XLL file?

Creating an XLL Add-in project Run Visual Studio via the Run as Administrator command. In Visual Studio, open the New Project dialog and navigate to the Extensibility folder. Choose Add-in Express XLL Add-in and click OK. This starts the XLL Add-in project wizard.


1 Answers

Starting out with the SDK can be a bit unpleasant. I'd suggest you try one of the toolkits:

  • XLW (http://xlw.sourceforge.net/) is a standard open-source C/C++ wrapper.
  • Keith Lewis's NXLL library (http://nxll.codeplex.com/) might be worth a look if you are feeling a bit more adventurous, and like modern-looking C++.
  • The Rolls-Royce of C/C++ toolkits for Excel is XLL+ (http://www.planatechsolutions.com/xllplus/).

Of course for managed code, or to make a C# wrapper that calls your unmanaged C++ code from .NET UDFs, you'd use Excel-DNA (http://exceldna.codeplex.com).

like image 184
Govert Avatar answered Sep 21 '22 13:09

Govert