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))
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.
Lead Program Manager
I would be content with it just replacing VBA- which honestly doesn't ever work as a result of all of MS O365 **** of SharePoint Online! It is honestly mind boggling that MS manages to get worse with every "improvement" that MS claims to implement.
I love Python too. So much, i learned much better environments than Excel, including export to Excel for Excel fans/users. There are things like Open Refine, SQL, have you tried to Google? Much better way how to spend your life and do your work than waiting if Microsoft will hear you :)
Jeremy Petzold commented
@ Anonymous, because no everyone needs to use an external data set and programming environment for handling data? Because Python is a much nicer language than VBA?
Why are you still trying to change MS plans instead of using much better and faster Python with Jupyter, Pandas aso., which can easilly handle data Excel is dreaming of?
Asad Rauf commented
We need this so much. With pandas 1.0 coming, I think this will be a big step in the right direction
Is this ever going to happen? I would love to have embedded Python in Excel.
Changes made to VBA reflecting changes made to excel itself. The language is frozen, but list of APIs always extending based on new functions in excel.
Programming in excel (or even FOR) is not the same thing as "real" programming. VBA is capable of almost anything (it was proven over all this years), you can even have pointers!
Moreover, if you going to build a massive app in excel - it's already bad idea and python won't help you there.
I forget to mention, that there's native C api via XLL libs. So the complete list of "languages" inside excel:
new macro recorder,
Adding python there won't give any benefits.
I think eventually MS will add java script as there's already environment prepared and excel for web is evolving where java script the only way to create add ins.
I have worked in many investment banks and I can tell that Excel is one of the key tool they have for lot of critical processes. Excel has many issues in automation - primarily because Microsoft never considered Excel as the strategic tool worth automation and assumed it to be used only by end users.
Excel (esp. Office 365) has a lot of potential to be part of mainstream software product development. For one, Excel is probably the best generic UI developed for any financial application, ever.
Well, VBA is dead to MS. There HAVE been small, small changes after the point they said it was done, would not be advanced further. (That, in itself, wasn't a bad thing as Excel is not chiefly used by programmers but rather by non-programmers so a set, unchanging VBA landscape had and has tremendous appeal to many.) But there is no growth, no new directions to accomodate more recent programming approaches, and no new or updated features. Nor will there be.It is NOT (ever going to be) "evolving."
For those great many though that DO want an evolving programming language, Python seems to fill the bill. For MS, the workload to accomodate it after the inital accomodation would be minimal and only necessary because the likely don't wish to expose that aspect of Excel... or Python developers would surely get right after doing that for them as well.
I acknowledge the current "others" but if I wanted to write code inside Excel that could reach out to a program I also wrote, or just use, that will do the real work hidden from users by being, well, a program, yet still be interactive at a very basic (ouch...) level with Excel so it can at the minimum be a front end if I like, well, something a lot like Python might be my choice. For many, many things.
It literally cannot hurt unless you don't have a grip on the important spreadsheets your organization owns. Which happens, yes, but so does money dropped on the ground and poor registration of organization passwords too. But you'd consider that bag of cash you have to be something that cannot hurt, eh?
Steven Stockton commented
VBA, and even almost every VBA tutorial I've seen + almost every bit of VBA sample code I've seen, _and_ all VBA code produced by the macro recorder promote Very Bad Things. Unsafe things. Slow things, like .select() and .selection(). Things that "just barely work, given the right circumstances", and sometimes things that only seem to work. Esoteric things, that have bizarre and sometimes undocumented side-effects.
VBA emits mostly-useless error messages. Like: "object-defined or user-defined error" when actually no error was defined, and the error arose outside of VBA code anyway.
VBA encourages use of MsgBox(), which is Horrible, in part because whenever this is called, the entire Excel interface (in every open workbook in the same instance of Excel) becomes unresponsive. But can still bring other workbooks to the front, just not interact with them, and Excel gives no indication why. The message box produced by this call doesn't show up in Alt-Tab or on the taskbar, either. A partial solution is Application.Assistant.DoAlert(), because then at least the message box will appear in front of any workbook that you try to interact with.
If you want to know how "easy" VBA is, read posts by Rubberduck on StackOverflow and on RubberduckVBA.
I don't know Python well, but for the many people who have learned it for some other purpose, it's easier than dealing with the many quirks and hidden traps of VBA. Projects which bolt Python to Excel like a sidecar include: PyXLL, OpenPyXL, Python for Excel (PFE), xlWings.
I, for one, welcome our new Python overlords, and would be in favour of building them a new house and IDE inside Excel.
I don’t think that implementing python is good idea.
VBA is pretty good and simple language for get things done (it’s even can utilize win32 api as well as any other dll!). Also success of VB6 and lately VBA has been related to how easily you can start developing, especially for non-developers (which majority of excel users are). Just hit ALT+F11 and you ready go.
Also it’s been there forever and changing very slow which is great because you can learn it once and further focus only on business task.
Yes, there’s some issues, but most of them can be fixed slowly evolving VBA.
For instance it would be great to refresh IDE, bring async.
It is very helpful to improve our work efficiently，because python is very simple and stronger，I hope Microsoft company can consider it as an Excel Scripting language
Mi job won't let me run Python on its own. They do let me run VBA, so they might allow Python inside Excel. This could be big for corporate use.
what is the update about this?
ige ielts commented
I can’t tell you how strongly I support this idea! Please make this a reality!
francisco contreras commented
I export the outputs of my python scripts to an excel file to share the data with no technical people (management) , would be great to have a built in python support as you already have in Power BI.
I dream to see Python as excel scripting language but please, keep VBA as well, do not remove it.
Its been like 4 years on this! Since then just look at the explotion of python as a go to language for Data Science and deeper analytics. No one is asking for a replacement to vba but moreso added functionality so that analyst can reduce the time it takes in changing over tools. Can you imagine if one was able to build prototypes in Excel using python then able to scale them up using pyspark or other tools? Well the answer is this is already happening its just wildly inefficient!
Most operational business instances can be solved using DAX but when applied and tied to bigger unstructured data instances I tend to vacate Excel for python and use some of its libraries to wrangle, transcribe, and communicate data findings. If I could do all of or sqy the 80 percent of effort spent wrangling data in Excel: holy smokes!!
Please re look at this thread and have a representative chime in to speak to any considerations being looked at.
Michael Magistro commented
Python is perhaps the fastest growing programming language topic on Stackoverflow. It's used for data science (a natural progression out of analysis in excel). Imagine how many people you'd attact to Excel if you had Python integration. Python is used for Jupyter Notebooks and Pandas (data science tools). This is all related. Integrating Python into Excel needs to happen!
I'm in a finance/investment environment setting where Excel VBA is de facto the universal language of all departments (of course Java, C# etc. as well in some other dep.) 20 year old vba's still do their job which is quite impressive.
I'm not sure whether a full integration of Python is necessary, although its a hype about it now. VBA Libraries that could use py classes etc. but also R, C#, F# or Julia (or simpler than XLL C++) other languages, would be fine,