Category Archives: PyXLL

Python functools – cache and lru_cache

Update 3rd April 2022: Following the comment from Larry Schuster I have modified the code so that the factorial0 function actually uses cache as intended, rather than lru_cache. I also added code to clear the cache after each timer run, … Continue reading

Posted in Excel, Link to Python, PyXLL, UDFs | Tagged , , , , , , , | 3 Comments

More Matplotlib problems

Following an upgrade to some Python libraries, I found that problems with plotting from Matplotlib causing Python to crash were recurring (previously reported here). When called from Excel with pyxll this was also causing instant crashes of Excel. I eventually … Continue reading

Posted in Excel, Link to Python, PyXLL | Tagged , , , , , | 3 Comments

Display Matplotlib animations in Excel

The latest version of pyxll (5.4.0) allows animations generated in Matplotlib to be simply copied to Excel. A spreadsheet with the examples shown below, and the associated Python code can be downloaded from: Animations2.zip The screenshot below shows the simple … Continue reading

Posted in Animation, Drawing, Excel, Link to Python, Maths, Newton, NumPy and SciPy, PyXLL, UDFs | Tagged , , , , , , , | 3 Comments

Rounding to significant figures

Edited 19th Feb 22, following comment from Larry Schuster Excel does not have a function to round numbers to a specified number of significant numbers, and (rather to my surprise) neither does Python. It is not too hard to write … Continue reading

Posted in Excel, Link to Python, Maths, NumPy and SciPy, PyXLL, UDFs, VBA | Tagged , , , , , , | 7 Comments

SectionProperties update 3

The SectionProperties spreadsheets previously posted had limited graphics capabilities due to problems with the plotting routines causing Excel to crash. I have now fixed that problem by updating some Python libraries with pip: installing mkl-service numpy 1.21.2 -> 1.22.1 Pillow … Continue reading

Posted in Beam Bending, Charts, Charts, Coordinate Geometry, Excel, Finite Element Analysis, Link to Python, Maths, Newton, NumPy and SciPy, PyXLL | Tagged , , , , , | 3 Comments