xlwings Blog
xlwings.org · Company blog · on HN since 2014
The xlwings team writes about automating Excel and Google Sheets with Python, including reporting, dynamic arrays, and Python in Excel.
What HN saysHN commenters recommend xlwings as an alternative to Microsoft's Python in Excel and as a strong option for combining Python with Excel.
20HN people shared it
14linked it in comments
12stories submitted
816story points
2 years agolast shared
2014people per year2026
Most-shared posts
- 1Use Python in Excel without add-ins18 people · 259 points · first shared 2014 · 70 comments on HN
- 2A New Way to Automate Google Sheets with Python2 people · 3 points · first shared 2022 · discussion on HN
- 3My thoughts on Python in Excel1 people · 288 points · first shared 2024 · 118 comments on HN
- 4Python for Excel: A Modern Environment for Automation and Data Analysis1 people · 196 points · first shared 2021 · 90 comments on HN
- 5The new dynamic arrays in Excel with Python and xlwings1 people · 65 points · first shared 2019 · 9 comments on HN
- 6Xlwings-Reports: Excel and PDF Reports with Python1 people · 2 points · first shared 2019 · discussion on HN
- 7What Makes Excel's Lambda Functions so great (and what doesn't)?1 people · 2 points · first shared 2021 · discussion on HN
- 8Python Libraries for Reporting and Factsheets1 people · 1 points · first shared 2020 · discussion on HN
What HN people wrote when they linked it
LolWolf · 2018-09-13
You can do this with xlwings![0] Would highly recommend.
——
[0] https://www.xlwings.org
_e · 2017-12-14
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/
mistermann · 2018-02-04
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/
iheartmemcache · 2015-11-26
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…
dragonwriter · 2024-06-06
AFAIK, Python in Excel is fine, but only if you don't use Microsoft's: https://www.xlwings.org/
taffit · 2023-08-23
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/
silvershell · 2021-03-09
I think XLwings (https://www.xlwings.org) can do some of that.
fzumstein · 2019-08-31
You can use Pandas via the xlwings package (https://www.xlwings.org)
eon1 · 2016-11-09
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-javascri…
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.
SixSigma · 2015-10-02
While I appreciate the idea....
Use Javascript to replace vba in excel
http://blogs.msdn.com/b/officeapps/archive/2013/03/18/excel-does-javas…
Use python to replace vba in excel
http://xlwings.org/
saboot · 2015-07-24
Wouldn't existing excel bindings for languages accomplish this?
https://www.pyxll.com/
http://xlwings.org/
jk3000 · 2023-08-22
phonon · 2020-11-13
warpech · 2020-02-27