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))

Wow.
Thank you to all those participated in our survey. What an amazing number of responses, many of them with very deep content. We’re processing the over ten thousand responses(!), and already appreciate the time so many of you took to answer with passion and experience.
Please know this survey is used to help influence various topics – both on Python as well as other related topics that the comments started to bleed into. Given the passion, I want to be clear this remains an area of exploration for us, without any specific timeline.
We’ll provide updates as we progress on this feature request.
Thanks!
Ashvini Sharma
Lead Program Manager
Excel
499 comments
-
Sam commented
VBA has been a dead language for nearly 20 years now. It is absolutely incredible that Microsoft still is so resistant to providing a modern alternative in Office. (And no, JavaScript "apps" don't count as they are far more limited than what you can do with VBA)
-
steven sheng commented
As a top ranked programming language for AI, the enabling python as scripting language would greatly enhance data processing capability of excel.
-
aaron james commented
Get the best parent control app. Check out this website https://spydetections.com/
-
P commented
Will this be moving forward now that Guido has joined Microsoft?
https://techcrunch.com/2020/11/12/python-creator-guido-van-rossum-joins-microsoft/ -
Anonymous commented
Agreed it needs to be added as a facility by Microsoft not a third party at extra cost to be useful so work can be shared.
-
Michael Critchley commented
What you fail to mention Tony Roberts is that you have to pay a $25/mth subscription to Pyxll to implement the solution you suggest. Excel users shouldn't have to pay extra to code using a modern programming language. Microsoft has the resources to replicate and surpass the functionality that this 3rd party software provides and yet, for whatever reason (an explanation would be nice), chooses to retain a legacy IDE for an outdated programming language.
-
Tony Roberts commented
If you want to use a Jupyter Notebook from within Excel for scripting like you can with the VBA editor see this https://youtu.be/Od-1cEac9U4. You can script Excel with this and Python, as well as writing user defined functions, RTD, macros, menus etc.
-
Tony Roberts commented
Python can already be used as a scripting language in Excel. Here's a video that shows how it's possible to write Excel functions entirely in Python: https://youtu.be/vyDd_3r93cU
-
Melisa Barýþ commented
This exceeded my expectations and is better than anything else I have used. I would definitely recommend it for such service
Get in touch with spydetections on
youtube https://www.youtube.com/watch?v=x0_JH3PIHvc&list=PLIcO5ME36b576PbQJ6gpIFUuP82CrVSKG&index=1
-
Guzman commented
What Microsoft is doing is letting people know that if you need more advanced resources you better go to something different rather than excel
-
Muhammad Raza Cheema commented
I work in the Manufacturing Industry and when we can't find a calculation in commercial software we turn to Excel and make a spreadsheet. One of the main reason I don't like Excel is how limited the VBA is regarding data integration. I learned Python to look for other solutions and I love Python now. It has everything for me and now I can create calculation spreadsheets without even thinking about excel.
No one asking to remove VBA support as a lot of businesses rely on it. Just add python support along with VBA and give users a choice. ANSYS has done it by using IronPython project.
-
Nick Hemsing commented
For those that are defending VBA, this isn't about VBA or replacing VBA with Python. Too many business and finance users are deep into VBA and I think Microsoft is well aware of the necessity of VBA to those users.
However, Excel is also used for sciences, including data science. It is also used by business users like me that use Python to manipulate large data sets. Having Python (or R) as another scripting language for Excel allows those users to integrate their algorithms with the features of Excel. Excel can, for those users, then take advantage of an expansive list of packages for gathering and manipulating data to then present in or prepare for further review, in their spreadsheets.
In my field, retail, having my python algorithms to run in Excel for my other business users would be incredibly powerful. I could access API's from data sources that are not available through Get & Transform or VBA. As it is, with new packages being created to get and manipulate data in Javascript, I'm starting to look at Google Sheets. VBA is just too clunky and the new people coming from college know R or Python. Javascript is a shorter hop from them than VBA.
-
Adriaan Riet commented
@Joe Bockover I really don't think you need to fully understand interpreters or third party modules to use python, any more than most business professionals understand the DOM. Also, python isn't a one-trick pony, so you can't pretend it "belongs" in one environment. I'm still hoping (maybe) one day to get this feature, so I disagree with those leaving "forever" that we've All Moved on, though. I found python far easier to learn than VBA, but maybe that was from the good documentation and decent IDE.
-
jay zh commented
@Jamie Totally agree with you. Those chose to ignore programming can still use Excel just fine, maybe with limited functionalities. However, for serious Excel users, programming is inevitable. For example, my work involves with lots of data and computations. Without a programming language's help I will be 1000 times slower and potentially not able to carry out any work. I chose to use Python to work with Excel because it's just so much better than VBA in all aspects.
-
Jamie commented
@Joe Bockover you're comment applies equally to VBA. The vast majority of Excel users aren't interested in VBA either. But those who are interested in programming in Excel would I'm sure prefer an environment that hasn't just been left to gather dust for years. I know I only use Excel where the end user needs a convenient input format, and everything else happens in python/javascript. Maybe that wouldn't be the case if python were built-in.
-
Joe Bockover commented
Dear python folks who want to say goodbye: Goodbye. You won't be missed. And Excel/VBA will live on just fine without you, considering so many business processes are deeply rooted and dependent on it.
I'd encourage you to remember: the vast majority of business professionals working in Excel have no interest in learning how to code beyond macro-level. Asking people to embrace python, JavaScript, or similar--with all of the overhead involved (understanding interpreters, runtime environments, third-party modules that don't align with the Office DOM, etc) is kind of ludicrous. Get over it and save python for science (data, chemistry, etc) where it belongs.
-
Nichlas Dyhr Hummelsberger commented
I agree with Craig. Those of us who once cared has found the solution directly in Python and have moved on.
It's a bit sad to see, as MS seems to be at the forefront of python development in other areas. But I guess Excel is dead left on life-support.
To anyone who needs real number crunshing I can recommend learning python, numpy and pandas. You will be able to do anything with data that you dream of, and can still deliver the result in pretty excel with the XlsxWriter module.
-
Craig commented
Well you've done it Microsoft. You took so much time on this that I've learned how to get what I need from open source Python libraries, and I love it! Thank you for forcing me to learn other (better and free-er) technologies. Goodbye Excel and VBA! We had some great times, but you're struggling to stay relevant in 2020.
-
Anonymous commented
It makes almost 5 years that microsoft promissed this feature. I think they will never release it (a python api like in libre office is not a huge work for microsoft???). The haven't released any beta version!
-
Anonymous commented
It would be great to enable it with a similar approach as PyXLL does:
https://www.pyxll.com/features