Lurker News
Folks, 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

Earlier comments
chrisaycock3 replies#
Does Excel have a "plugin framework" for new languages the way Jupyter does? Ideally any language (Python/Julia/R/whatever) can be added by a third party without Microsoft's direct involvement.

The plugin authors would only need to map a language or library's DataFrame mechanics to Excel's table layout. (Microsoft could even use Apache Arrow to represent the data.)
I imagine there would be lots of possibilities by providing "hooks" for language designers to connect to.

cm21871 reply#
You can pretty much already do what you want with VSTO or XLLs. However having a standard scripting language installed on everyone's machine is a all different thing. It means you can add some scripted logic in your spreadsheet, give it to someone else, and know it will run without having to install or maintain anything.
blendo#
This is incredibly important. When I worked at BigFinCorp, we always used vanilla Excel (VBA and ODBC to RDBMSs). So our sheets would always "just work".

Python would be great in this role, but to avoid separate configuration, you'd need to ship the runtime with the spreadsheet, right?
Or would this new Excel capability be built on .NET? In that case, C# (for the enterprise folks) and F# (for the bleeding edgers) would be fun, too.
Bottom line, the Developer mode of Excel should support more than VBA.

TazeTSchnitzel#
> Does Excel have a "plugin framework" for new languages the way Jupyter does? Ideally any language (Python/Julia/R/whatever) can be added by a third party without Microsoft's direct involvement.

Could they use Microsoft's old Windows Script Host thing?

craigyk3 replies#
I'd vote for Lua: faster and less heavy than Python... Plus my biggest concern for Python would be how well the team can sandbox it. I know in this regard Lua also has advantages. Disclaimer: I am _way_ more proficient in Python than Lua, I just think Lua is a better choice.
jimnotgym1 reply#
Does Lua have anything like Numpy or Scikit-learn?
petre1 reply#
Yes, it has Torch.
carlmr1 reply#
Pandas?

Continue this thread — 1 reply

dsnuh#
I was thinking the same. Would Excel be able to embed it like so many other projects do?
alexeldeib#
I've recently been using Lua, and I love it. That said, I find python a far more appropriate language. Think about the use cases and the ecosystem around python.The quality, breadth, and depth of the Lua ecosystem for the finance/education/data users of excel will lead users to favor Python.

The main thing that might be nice is tables as a data structure for spreadsheets, but somehow I picture pain.

cm21871 reply#
Might be worth reminding everyone of a dead Microsoft project called VSTA, which was basically a live .net IDE embedded in Office. Effectively a mini visual studio inside any office application, where you can write any .net language. This would have allowed people to script in VB.net, C# or F#. Microsoft killed the project before it shipped (but licensed VSTA as a scripting tool for third party apps for a while). It's a pitty. I think this would have been a better solution than python.
smortaz#
Good point that the tooling would've been awesome. However, I don't think .net would have spawned the rich ecosystem of Python pkgs that we enjoy today. And /that/ is a huge part of the whole Python value prop. From astronomy to finance to bioinformatics to ML & everything in between, there's a pkg for that. We even did sponsored a port of numpy+scipy to .Net (via Anaconda). At the end of the day, there were just too many corner cases & too many pkgs to port for it to make sense.
cm21871 reply#
What is interesting is also the implications of them now considering python.

First if it is python, it is not javascript, which seemed to have been their previous favorite candidate until now (not sure if it really picked up).
Second, the writing on the wall for VB as a language starts to look like a time square billboard. They basically put VB.net in maintenance / compatibility mode like webforms and winforms. I think it is clear that a new scripting language would be meant to ultimately replace VBA (which has been on maintenance / compatibility mode for 20 years!).

contextfree2 replies#
excel already supports javascript for custom functions, add-ins, etc
cm2187#
I wasn't aware one could do UDF with javascript. Thought it was for addins only.
fcrick#
any interaction with excel using javascript clears the undo queue - even the action of reading data, or even not doing anything. Makes the system almost completely useless.

Load more comments