Tag Archives: xlwings

Excel to Alglib via xlwings

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 … Continue reading

Posted in AlgLib, Curve fitting, Excel, Link to Python, Maths, Newton, Numerical integration, UDFs, VBA, xlwings | Tagged , , , , , , , , , | 1 Comment

Installing xlwings 0.11.4

The 0.11 versions of xlwings have some major changes to the arrangement of the required files, which will make installation and updating much easier, but for some reason Anaconda is very slow to upload the new versions, and the pdf … Continue reading

Posted in Excel, Link to Python, VBA, xlwings | Tagged , , | 1 Comment

Counting non-pecked chicks

Download file:  Binary Chicks.zip. This post is based on a recent discussion at Cosmic Horizons looking at numerical methods to solve the following problem: The answer to the question is straightforward: With a little thought, you should be able to realise … Continue reading

Posted in Excel, Link to Python, Maths, Newton, UDFs, VBA, xlwings | Tagged , , , , , , , | Leave a comment

Using Matplotlib from Excel with xlwings – update

In February 2016 I posted a spreadsheet with examples of linking to the Python Matplotlib library with xlwings.  Since then updates to xlwings required some changes to the python code, specifically plot.show has been replaced with pictures.add. The spreadsheet has … Continue reading

Posted in Charts, Charts, Excel, Link to Python, Newton, NumPy and SciPy, VBA | Tagged , , , , , , , | Leave a comment

Indexing NumPy arrays with floats …

… now you can’t. I recently updated to the latest version of NumPy (1.12.1), and today I discovered that some of my spreadsheets using NumPy arrays (via xlwings) were returning errors like: IndexError: only integers, slices (`:`), ellipsis (`…`), numpy.newaxis … Continue reading

Posted in Arrays, Excel, Link to Python, NumPy and SciPy, UDFs, VBA | Tagged , , , , , | Leave a comment

The meaning of = in Python

In VBA, if you have an array named a and a variant named b, then the statement “b = a” creates a new array b with the same size and values as a.  If the values of either a or b are subsequently changed, the values of the … Continue reading

Posted in Arrays, Excel, Link to Python, NumPy and SciPy, UDFs, VBA | Tagged , , , , , , , , , | 2 Comments

Debugging with xlwings and PyCharm

The xlwings documentation covers de-bugging, but it is very brief and it took me some time to get everything working, so this article covers the process in a bit more detail.  The details are affected by the editor being used, … Continue reading

Posted in Excel, Link to Python, UDFs, VBA | Tagged , , , , , , | Leave a comment