The xlwings team writes about automating Excel and Google Sheets with Python, including reporting, dynamic arrays, and Python in Excel.
HN commenters recommend xlwings as an alternative to Microsoft's Python in Excel and as a strong option for combining Python with Excel.
Python has it's place. When teaching kids, I guess it comes down to two things - are you targeting the lowest barrier to entry to make something whiz-bang to appeal to the largest common denominator of "I use Facebook so I'd like to make 'computer things'", in which case, alright they can install Tampermonkey and mess with a really inconsistent language like Ecmascript5[1] then spend a lot of time explaining things like the DOM and how to traverse it, then the issue of how to manipulate certain things (what do if getElementByName isn't working because someone decided to not properly tag things?), followed by now we have to teach them CSS so they actually can alter the aesthetics or worse, teach them JS so can actually add functionality (which involves all of the ES5 shims and a huge confusing ecosystem that even people in the industry like us have to spend tons of time working on).
On the other hand Python can be installed with one binary on Macs, Windows, and Linux with 300 packages and an IDE[1] and they'll be able to use it with the Excel spreadsheets down the road which they'll inevitably have to deal with if they're the average white-collar office worker. (See: http://xlwings.org/ and say goodbye to VBA). The large majority of people will actually use Excel on a regular basis and if their job involves reconciling a lot of semi-structured data, as it frequently occurs with my friends in the social sciences or other non-CS fields, they'll largely benefit from…
I wasn't aware of that much progress on your first link.....I'm curious to know if at the same time they've put any effort into improving the half-assed Excel COM API.
Totally agree on the Power Query thing, if they'd support pandas + power query + embeddable Power BI objects in Excel + seamless integration with cloud functionality (there's still no way to use Power Query in SSIS for goodness sake).
Using pandas in an Azure function and then consuming that from Excel and displaying in Power BI visualizations, all within a nie little wrapper you can email around or whatever would just be a killer app. This is one of the few advantages Microsoft has over the Amazons and Googles, I wish they'd take advantage of it.
The syntax in your example is lovely and this is something I've wanted in Excel for a very long time.
EDIT:
There is some interesting 3rd party innovation happening: https://www.xlwings.org/
Both Python and R can be used in Excel via several addons.
Python:
http://www.python-excel.org/
https://www.xlwings.org/
https://datanitro.com/
R:
http://rcom.univie.ac.at/download.html
https://bert-toolkit.com/
However, officially MS have chosen to move ahead with Javascript for add-ins and VBA-like automation:
https://dev.office.com/docs/add-ins/develop/understanding-the-javascript-api-for-office
http://rockthecode.io/blog/javascript-and-excel/
As for SQL, you can use Data Connections from the GUI or ADO with JET/ACE in VBA to query Excel sheets, CSVs, etc as you please.
Regex can be used with the VBScript.Regexp object, but it's a slightly funky (perl-like) syntax and not a great implementation.
Reading the headline, I initially thought that Microsoft bought the company behind XLWings [1], which also enables you to use Excel directly within Excel, even locally. Not affiliated in any kind to that company, just used it in the past.
[1] https://www.xlwings.org/
Dear Excel team,
Take a look at the top three results for "excel python" on bing.com for some great ideas on how to incorporate python into excel.
---
1.) https://www.python-excel.org
2.) https://www.pyxll.com/
3.) https://www.xlwings.org/
While I appreciate the idea....
Use Javascript to replace vba in excel
http://blogs.msdn.com/b/officeapps/archive/2013/03/18/excel-does-javascript-a-vba-developer-s-perspective.aspx
Use python to replace vba in excel
http://xlwings.org/