Excel team considering Python as scripting language: asking for feedback
594 pointsFolks, Microsoft is officially considering providing Python support in Excel (finally). If you are interested in this, please visit their uservoice page and let them know what you think. Thank you!
https://excel.uservoice.com/forums/304921-excel-for-windows-desktop-application/suggestions/10549005-python-as-an-excel-scripting-language
Comments (268) 74 threads
Yes they should choose Python, and in the process decide if it will be Python with a .Net library (standard and core as seperate libs please!) or IronPython. This in itself is an important first choice.
Then it has to be done in a mechanism that enables the exact same libs and user written python code to work in the same way across all the Office products.
Other languages have been suggested, all good choices with their own merits. Lua is a good chocie for compactness and speed. C# is lingua franca of commercial developers so would suit ISVs but i think too heavy for end user scripting. Nim or even freepascal maybe? Lastly whatabout just using VB.net consistently? VB is a great language for newbs and casual/adhoc programmers .... but it gets ignored because of problems with consistency of implementation by MS.
Last point i would like to make is IMHO the choice needs to be based on: - ability to transpile to javascript so that Excel365 can be scripted from webapps - install-free deployment; should be built into Excel in a way it can be used without any user install for dev or runtime - standard vanilla language, not a variant
Disclaimer: A huge fan and long time user of python here. I also spent largest part of working life in ISV world rather than end user land.
Now given that cPython 3.6 has f-string, and that you probably will use string formatting a lot if you script a MS product, I would implement this version specifically. It's the most recent stable version of the standard implementation anyway.
Actually no, I would not implement anything. I would embed the cPython 3.6 interpreter and stdlib, and just provide a binding to it. This limit the problem of bad / inconsistent implementations that crippled MS products in the past.
Then I would say "we guaranty to provide a 3.6 compatible cPython + stdlib for the next x years" so that people can be confident to write Python stuff. Otherwise, a bad implementation would be worst than no implementation at all.
Is it, though? For example, VB puts four different ways of passing arguments right in your face: values by reference, values by value, object references by reference and objects references by value. Python only has the last one and doesn't make you think about it.
And without "Option Explicit" VB does something very unhelpful (also seen in PHP): misspelled variables are created on read and silently converted to the required type, giving you nonsense results. (With "Option Explicit" enabled it gets verbose and tedious instead.)
Take a look at the top three results for "excel python" on bing.com for some great ideas on how to incorporate python into excel.
---
1.) https://www.python-excel.org
2.) https://www.pyxll.com/
3.) https://www.xlwings.org/
https://www.youtube.com/watch?v=Gu31s7kXPOg
Huh, on the one hand sounds like a such a simple way to deal with it that I can have trouble imagining a more elegant approach.
On the other hand, does it still respect the ways that Excel updates cells? Sicne that kind of requires immutability I think.
The https link doesn't seem to work, try this:
http://www.python-excel.org/
https://excel.uservoice.com/forums/304921-excel-for-windows-...
[disclaimer+bias: on Python team @ msft & would love to see this happen!]
https://www.python.org/dev/peps/pep-0551/
There's a YT talk as well.
Continue this thread — 2 replies
Well, I guess that explains why you care about Office in 2017.
I'd argue large companies are still running Windows because of Office. The cost of retraining people, redesigning all of these user processes and converting all those documents would be massive. Whereas most new corporate applications in the last 5 years have been mostly web based.
So I am surprised Microsoft under-invest in what is they main strategic lock-in in the juicy enterprise market.
Continue this thread — 4 replies
* Python 3
* Numpy, SciPy, Pandas, Matplotlib, Altair, ...
* Pythonic bindings for Excel APIs (sheets, etc etc)
* VSCode's Python Editor + Debugger built in
* Some sort of conda based env/pkg mgmt
* Right-click, "Open in Jupyter" (data/code)
*
Continue this thread — 3 replies
I mean, MS implemented these really nice Tables in excel, but then left us no way to easily query them with something like SQL.
Continue this thread — 7 replies
Are there plans to get this working with the Excel web-app, or just the desktop version? I'm just having a daydream about Excel, Juypter notebooks, and OneNote Class notebooks...
Our team provides a free service for anyone to run Jupyter Notebooks on Azure. It's currently a big hit with the Edu crowd. We're seeing lots & lots of universities upload & teach courses on it. eg:
http://notebooks.azure.com/richie
There's also an Intro to Python notebook on the front page.
Hopefully the Excel team will consider Jupyter integration, esp for the web-app version! You're right that it's a killer combo. Check out xlwing's video on using Excel+Jupyter - it's brilliant.
All comments shown.
Couldn't load more comments. Check your connection and try again.