The Alglib library provides many valuable numerical analysis routines, but the VBA version is no longer actively maintained. The latest versions are available in C++, C#, and Python, of which the Python version (in conjunction with xlwings) provides the easiest interface with Excel.
An Alglib/Python based spreadsheet has previously been presented here. I have now updated this to the latest versions of xlwings and Alglib, added additional solver and linear algebra functions, and updated the Python code to make better use of the xlwings auto-import functionality, which generates the necessary VBA code at the touch of a button. The new spreadsheet can be downloaded from:
As usual, the download files include full open source code.
To install the necessary files:
- Install Python, either version 2 or 3. The Anaconda Python package will also install xlwings, but see below.
- Install or update to the latest version of xlwings (0.11.04 at the time of writing). If the automatic install delivers an earlier version, see here.
- Install Alglib.
- Copy the contents of the xlAlglib zip file to any convenient location.
- Any problems, please let me know.
The screenshots below show the functions available in the new version. Future posts will look in more detail at specific examples, and procedures for modifying the Python code.
List of functions: