Python as an Excel scripting language
Let us do scripting with Python! Yay! Not only as an alternative to VBA, but also as an alternative to field functions (=SUM(A1:A2))
Hi folks –
Thanks for the continued passion around this topic.
We’d like to gather more information to help us better understand the needs around Excel and Python integration.
To help us with this, can you please complete the survey below?
Lead Program Manager
Peter “Aprillion” Hozák commented
I think a plain text option is necessary to support Git & code reviews & tooling - as I explained in the survey and copied to https://gist.github.com/Aprillion/f10ca5ff23930a65db58e2b9bdb97f03
The Data science community will surely benefit tremendously from adding Python to Excel
Also make Excel available on Linux.
Whaaaaaaat are you waiting for? Python should have been integrated years ago. I checked this page earlier today and you still haven't done it? Get to work now.
Don't listen to anti-Python FUD. From non-programmers perspective Python is the easiest language to learn how to read and write.
Most Excel users are not developers and non-developers are people that don't want complicated and hard.
Most businesses don't have developers working full time writing code. Especially small and medium sized businesses. They have people like accountants. They have people that are trained in business not programming.
Stefan Holmes commented
Go further. Integrate VS Code as the Alt+F11 editor and provide Python integration across the entire Office suite.
I know there is a workflow for serious Office automation via Visual Studio and add-ins. Sometimes, scripting is the only way to get something done.
Python !!! Please, Python!!
It has the best libraries, it's easy to leran, specially for non IT people like myself.
Radoslav Hnidka commented
Please please pelase make this happen.
Francisco André commented
Concerned Architect commented
ryan kauffman commented
As a passionate devotee and heavy user of VBA, nothing would make me happier than to integrate Python into Excel!!
If it allows for the integration of python libraries, the business case for this would be very strong. It would allow for the construction of simple spreadsheet interfaces that can tap numpy, scipy, tensorflow, etc. and yet remain understandable to the user.
Agree with everything that was said here ... for R. Include Microsoft R Open into Office installation and benefit Excel, PowerBI and eventually SQL Server
pascal bellerose commented
I don't get why excel should integrate Python. Better coverage of features using vba would be a better approach I think.
Just changing the way external data requests have changed over time have caused a great deal of disruption in the end-user community.
Integration of Python scripts seems more complicated than integration of R which is already present in PowerBI.
If you want Python simply because you don't want to learn another language, maybe it means you are no longer a computer geek (if you ever been one) and you should find another job.
Having done a fair bit of automation work with Python on Excel in the past, here are some feature suggestions:
1. Make sure the API metadata is available through the standard python reflection capabilities. With Activestate you had to generate a wrapper to make this work well. Using reflection with Python is a good way to figure out how to use COM APIs if you can read the type lib.
2. Make sure that ranges and selections play nicely with native Python arrays.
3. Make sure you handle variants properly, especially APIs like the pivot table metadata that makes extensive use of variant arrays.
4. Ensure that you can do database access from Python, for example through odbc. This is a lot more useful than you think.
5. A facility that could use the python generator or some similar mechanism as a data source for a pivot table would be a win. In fact, making powerpivot scriptable through Python would be an even bigger win.
6. Python support for writing deployable apps on top of MS Access would be a bigger win still. Again, make sure you support at least odbc (or ADO.Net if you go down the route of a .Net hosted Python) for programmatic database access.
7. If you go down the .Net route, make Winforms (or maybe WPF) available to the package.
8. Similarly, numpy/scipy.
9. We're aware that you have a legacy API but Array indexes start at 0. Think of this W.R.T. wrapping APIs in the array as Python sequences.
That's a starter for 10.
Christopher Rath commented
Please do NOT add Python scripting. If you're going to add something alongside VBA then please use your limited resources on a language that does not treat whites space (indentation) as significant.
Pleaseeee dooo ittt!!! :D :D
James Tullett commented
I would also like to see this feature.
Jeff Kriske commented
This would be fantastic. It'd be even better if I could use it on Excel installed natively on Linux...
James Fuqua commented
It'd be great to see the ability to do Python and IronPython.