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))
Thanks for the continued passion around this.
We’ve been busy building an infrastructure that allows remote execution of arbitrary code from custom functions in Excel. This was introduced last week at the Microsoft Ignite conference with Azure Machine Learning (https://azure.microsoft.com/en-us/blog/tools-for-the-ai-driven-digital-transformation/), which itself can host code in various runtimes.
This is just the beginning, and doesn’t cover many of the scenarios this user voice item now has. Just wanted to drop a quick note saying we’re continuing to work to deliver the scenario we announced with high quality and explore other integration points.
Lead Program Manager
I don't understand, one year ago this had more thsn 7.000 votes.
Anyway, go Python!
Sebastian Riera commented
xlsxwriter and openpyxl have already accomplished a lot. surely taking credit for all the work they've already done isn't something you're opposed to.
not gonna get into R vs Python vs Java (we all "know" which one's best) but it seems python would be relatively easy.
Jason Whittle commented
Please, Please integrate Python. Not only would it make excel better but it will expose students and new users to programming in a way that's not too overwhelming.
Zev Spitz commented
Do we have to choose? Integrate Excel with VS Code (https://excel.uservoice.com/forums/304921-excel-for-windows-desktop-application/suggestions/20010145-integrate-vs-code-into-excel-at-the-same-level-as) and use both.
I use Python to extract data from unstructured data sources. It would be great to integrate this capability with Excel. It can extend Excels external data functionality.
Unlike JavasScript, Python is not a web standard. If still Python is to be introduced only to support its community, it is R that should go in first.
>Where else can Python add value to Excel?
Excel has got -
Power Query for advanced data manipulation
Power Pivot for BI data modeling
Power View for Visualization
R can be introduced first for advanced data analysis (which Python is also good at) and advanced visualization.
Where else can Python add value to Excel?
Still support for Python can also be introduced into Excel taking it's huge community into consideration but the pressing need is still sounds more for R.
Do we need Python anymore?
Andre Terra commented
R is not used a general purpose language as much as Excel. It's virtually domain specific (Statistics) and there's no reason to shoehorn spreadsheet scripting into that.
R should be introduced first because - the vector arithmetic of R is close to the way we work with cells and ranges in Excel. Data frames in R are close to the concept of tables in Excel. This makes both Excel and R communities picking up either technologies easily.
1. Best option would be Python and R
2. If that's not possible I prefer R but I think Python would probably help more people(?)
3. There already is the excellent excel.link package on CRAN. You might want to make that official (either by talking to the author or forking)
Most universities and high schools are now teaching Python as the 'go-to' programming language. Microsoft, you are missing out on a prolific opportunity if you don't enable Python in Excel... just saying.
I thought I remembered seeing 8,000+ votes...
Anyway, there's obviously a lot of demand for this feature from the thread; can someone from Microsoft update us on whether there may be any plans to introduce this?
What happened with the votes? Last year there was almost 8.000 votes and now there are "only" 3.000 votes.
Can somebody comment on this?
Python for Excel would help so much in my work as a structural engineer.
I already use Python, but it is hard to distribute to collegues since everyone only use Excel.
Great Idea. Really hope that you guys at Microsoft will comtemplate some form of integration between these two amazing tools.
Andre Terra commented
People saying VBA is essentially the same as Python just don't understand programming. Anyone who's ever written classes in VBA and in Python will need no further convincing.
Matthew Crews commented
As someone who has worked with both R and Python, I vote for Python. For people coming from VBA it will be a much easier transition. R has many quirks which would not be intuitive for people working in Excel. The Python syntax is more straightforward than R. R only becomes very powerful when you enable the use of libraries from CRAN. Python is a good language, even without any other libraries.
Zev Spitz commented
(Not familiar with R). I support this idea for (if nothing else) Python's lambda expressions, which enable a succinct style of data processing (think LINQ) than requiring multiple nested For/For Each loops in VBA.
How would the editor/debugging experience work? Must Office also have an embedded Python IDE, like the VBA IDE? I know Visual Studio Code supports debugging Python via an extension, so it should be possible to debug with an external IDE.
Would Python support be enabled for other Microsoft Office programs as well?
I understand the intention is to either 1) allow Python programs to be embedded inside Excel documents, or 2) allow Python programs to be hosted by the Excel application. Or both. What about security implications?
Frak Nuaimy commented
I prefer Python over R. I am a software engineer.