Python in Excel – two views

Microsoft recently announced that it is now possible to access Python from within Excel worksheets. This functionality is currently only available to Excel 365 users on the Insiders – Beta channel, who can access it at no cost. When it is released to all it will be an additional subscription service.

It was announced with a good deal of hype by Microsoft, but here are two (very different) reviews from other sources.

Tony Roberts (the author of pyxll) provides a detailed review and comparison with pyxll at:
What are the differences between PyXLL and Microsoft’s “Python in Excel”?

In summary he says:

This is a new product for Microsoft, but our initial impression is that it is disappointing. It is our belief that the design decisions taken will, if used, result in less maintainable, error prone, and slower spreadsheets.

Microsoft have added a new “PY” function that will execute arbitrary Python code, remotely in an Azure container running their own Anaconda distribution. We all know the problems associated with VBA code being coupled with workbooks, and now with this PY function the situation is worse as a spreadsheet can contain any Python code in any cell, so code will end up copied and pasted everywhere in a way that will be impossible to maintain. You can’t structure your code into packages, all of your code is written in the cells in the workbook.

This is virtually the complete opposite approach taken by PyXLL, which is to get code out of Excel to a place where it can be shared and re-used across workbooks. This gives Excel users a clean, manageable toolkit of Excel functions, written in Python. PyXLL functions run in your own Python environment and so you can import and use your own packages.

… but see the link for full details and a detailed comparison of pyxll and Python-in-Excel features.

For a different viewpoint, see the YouTube video below from Leila Gharani, which gives an enthusiastic summary of the capabilities of the new feature, together with a demonstration of some of the basic ways it can be used.

This entry was posted in Excel, Link to Python, Python Pandas, PyXLL and tagged , , , , . Bookmark the permalink.

2 Responses to Python in Excel – two views

Leave a reply to dougaj4 Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.