XlCalcNet (a Microsoft EXcel addin for Calculations in multiprecision, based on PythonNet) focusses on numerical calculations in multiple precision and data visualisation.
The main goal of XlCalcNet is to enable the use of functions written in Python or C# within Microsoft Excel spreadsheet formulas. It is therefore assumed that Microsoft Excel (2010 or later, 64 bit) is installed on the users system, running under Windows (7.1 or later, 64 bit), with .NET Framework 4.8/4.8.1 installed. Detailed information regarding the installation and general usage of XlCalcNet can be found here.
The full manual is available online in HTML format: XlCalcNet.html.
The manual can also be downloaded in PDF format from the Assets on the Releases Page as "xlcalcnet.pdf".
Since the main goal is to give access to software written in Python (or, via PythonNet, software written in C#) within Microsoft Excel spreadsheet formulas, a dedicated CPython installation is strongly recommend, to make it easier to configure the interaction with Microsoft Excel, without disturbing existing Python installations.
The interaction with Microsoft Excel is achieved by running a socket server written in Python, which is called from spreadsheet formulas using the functionality provided by ExcelDna.
The code which is necessary to make all of this work contains much more C# and Pascal/C/C++ than Python, so the project is not really suitable as a project on PyPI, but is provided as a Github project only. Both the source code and precompiled binaries are included, since compiling all of the source code requires MSYS2, Free Pascal and Visual Studio, which not all Excel users will want to install on their local system.
On the Python side XlCalcNet includes (a slightly patched version of) Mpmath 4.0 to provide a rich set of functions in arbitrary precision, using not only Mpmath's binary floating point and interval data types, but also Python's built-in Decimal and Fraction data types. If gmpy2 is installed, its data types can be used in many cases instead of Mpmath's binary data types, being much faster. Likewise, if python-flint is installed, its data types can be used in many cases instead of Mpmath's interval data types, being much faster, and sometimes more accurate.
Also included in XlCalcNet is (a slightly patched version of) of S3Dlib, a Python library for visualizing 3D surfaces and lines which is used in conjunction with the Matplotlib library.
On the Pascal/C/C++ side, XlCalcNet uses DAMath, Boost Math, Boost Multiprecision, Boost Odeint and Eigen to provide numerical functions in single, double, extended, quadruple and octuple precision, which are available to the user both from C# and Python.
The XlCalcNet2 library, which is licensed under the LGPL-3.0 and is therefore provided in a separate repository, is based on Boost Math, Boost Multiprecision, Boost Odeint, Eigen, GMP, MPFR, MPC and FLINT and provides functions for the same data types as XlCalcNet and also in arbitrary precision, which are available to the user both from C# and Python.
XlCalcNet is intended to be used together with existing Python libraries like NumPy (described in the manual here), Matplotlib (described in the manual here), Pandas (described in the manual here), SciPy (described in the manual here).
This shows Excel's function dialog with a python script example
XlCalcNet can also be used for procedures. To access the relevant dialog, right-click anywhere on the spreadsheet. The following context menu will appear:
Click on Navigator for XlCalcNet. The following dialog box will appear:
The SourceOfBasicLibraries repository provides copies of the source code of the underlying numerical libraries, which are required to build the XlCalcNet library. These copies also include small patches, as required. They are provided to make it easier to reproduce the compilation results, as distributed as part of the XlCalcNet repository.
The source code of the following libraries is included:
Eigen, (version 5.0.1).
Boost, (version 1.90.0)
Amath/DAMath (version 2.27).
The SourceOfBasicLibraries2 repository provides copies of the source code of the underlying numerical libraries, which are required (in addition to Eigen and Boost, see SourceOfBasicLibraries) to build the XlCalcNet2 library.. These copies also include small patches and .sh files, as required. They are provided to make it easier to reproduce the compilation results, as distributed as part of the XlCalcNet2 repository.
The source code of the following libraries is included:
GMP (version 6.3.0),
MPFR (version 4.2.2),
MPC (version 1.3.1),
FLINT (version 3.4.0).


