Scipy functions with Excel and pyxll

Over the years, I have posted a large number of user defined functions (UDF’s) allowing Python Scipy functions (and related libraries) to be accessed from Excel. These have now been consolidated in a uniform format, using the pyxll add-in and can be downloaded from:

py_SciPy.zip

The download contains full open-source Python code and example spreadsheets that will be reviewed in this and following posts. To use the code the following software is required:

  • Excel for Windows
  • Python
  • Numpy, Scipy, and additional packages for specific applications (see later posts for details)
  • A licenced copy of pyxll (or an active demonstration version)

Details of the pyxll package (including download, free trial, and full documentation) can be found at:

pyxll

For those installing a new copy of pyxll, a 10% discount on the first year’s fees is available using the coupon code “NEWTONEXCELBACH10”.

Having installed Python, Numpy, Scipy and pyxll:

  • Copy the contents of the download file to a folder on the pyxll pythonpath (as defined in the pyxll.cfg file).
  • Add “StartSciPy” to the pyxll modules list in pyxll.cfg

The spreadsheets included in the download file will activate the associated functions automatically, but they will also be available from any other file through the add-ins tab:

The py_Numpy.xlsb spreadsheet has many examples calling Numpy functions, including:

A list of all available functions, with documentation:

Polynomial functions:

Working with arrays:

Numpy math functions:

Numpy trigonometry functions:

High precision functions for integers:

Floating point functions:

Numerical range functions:

Sorting functions:

This entry was posted in Arrays, Excel, Link to Python, Maths, Newton, Numerical integration, NumPy and SciPy, PyXLL, UDFs and tagged , , , , , . Bookmark the permalink.