5 ms·
This was a nice surprise to see today as an Ex-Excel developer who worked on trying to bring Python to Excel (and, I guess, failing ;)). 7+ years ago I had the
by vba 3y ago
This was a nice surprise to see today as an Ex-Excel developer who worked on trying to bring Python to Excel (and, I guess, failing ;)).
7+ years ago I had the option of leaving the Excel team. My then boss’s boss knew I had an interest in bringing Python to Excel and offered me a chance to tackle it if I chose to stay. What was meant to be a 6 month project turned into a ~3 year project, the Python part faded away and we ended up enabling JavaScript Custom Functions in Excel instead.
For Python we were also running ‘in the cloud’ (AzureML v1), although there was some back-and-forth on if we should run locally. I think what made the Python part disappear was our partner AzureML team re-orged, re-released, re-hired, we lost a PM and our work caught the attention of another partner team who realised they could use our code to execute their JavaScript out-of-process. And so I spent a lot of time ensuring that feature was successfully shipped at, I guess, the detriment of Python.
I had a lot of help from some strong engineers and learnt a lot. The core of the work was modifying the calculation engine of Excel to allow functions to compute asynchronously, allowing the user to continue working on other parts of their spreadsheet while the remote endpoint (be it JavaScript, Python or something else) was computing. Previously the spreadsheet would lock up while calculations were running, and that wouldn’t be cool for long-running unbounded calculations. Have to wonder if any of the stuff we built made it into this new feature.
Super great to see this and look forward to trying it out.
Recalc or die
- smitty1e 3y agoGreat user name. I have a private github repo called NVBC, the "NecroVisualBasiCon", with all of my favorite VBA-isms. When I code it, I indent all of the `End *` lines to column 80, to make the VBA look more like python.
- fzumstein 3y agoThanks for your work! The async JS functions are amazing and allowed me to ship rock-solid Custom functions with xlwings and Python. The problem with Office.js is that it’s just simply too hard to get started with all the npm bloat for the average Excel user (even more professional devs struggle). Well, I am pretty happy how I am saving users from having to use Node.js: https://docs.xlwings.org/en/latest/pro/server/officejs_custom_functions.html https://docs.xlwings.org/en/latest/pro/server/officejs_custo...
- deleted 3y ago[deleted]
- vba 3y agoOh this must be Felix! I saw and played with xlwings many years ago and was impressed :) Agreed with the friction around getting started. I would like to see it reduced. It’s cool to see you using them to wrap Python functions - I have done something similar before myself, and still need to get around to shimming Haskell into excel at some point. Another thing I don’t like is how JavaScript Custom Function cell formulas have a horrible string after the _xldudf marker, which becomes noticeable if your workbook doesn’t/can’t load the custom functions addin (or you unload the addin) Thanks for your comment
- fzumstein 3y agoIt's me, yes, are you Michael then ;)? Yeah, I love the Office.js platform, I believe it's the most versatile extension platform there is, it just came out during an unfortunate time (when people believed that you can't use JS without React anymore ;) Anyhow, the magic of Office.js is that you can use it like a JS framework with total freedom what you use on the backend (it's just a fetch call away), so whether that is .NET or Node or Python/R/Julia doesn't matter at all, it's just that the official docs don't really bother to explain that or show an example other than Node & C#. What's a game changer (and only available on Office.js) is the integrated authentication via SSO/Azure AD, which is the first thing any IT department in a corporation is interested in.
- vba 3y agoI’m not Michael - presuming you are referring to Michael the PM. I was a dev. I’ll add you on LinkedIn. Great to here you praise auth. I almost forgot getting auth ‘right’ inside Excel was a real time burglar.
- ripley12 3y ago> The problem with Office.js is that it’s just simply too hard to get started with all the npm bloat for the average Excel user (even more professional devs struggle) IMO deployment is an even harder problem. The Office team makes it incredibly difficult to deploy web add-ins (presumably for business reasons) and accordingly most companies I'm familiar with are still using the ancient, barely-supported COM+VSTO add-in models.
- rvba 3y agoDo you know why Microsoft never made proper examples of the new technology? The few examples provided are for programmers only. In general there is a scarcity of working code that you can inspect to see how javascript in Excel works. Now it is mostly "how to draw an owl"
- jakzurr 3y agoThat's really an interesting story; thanks for sharing it.
- dnadler 3y agoThanks for your work on that! I use custom JavaScript functions to hit our internal analytics API. It was really nice to work with.
- vba 3y agoThanks for your kind words. Did you ever use streaming function to update your analytics periodically or when new data become available?
- paulddraper 3y agoAppropriate username
- vba 3y agoAn aside - I wanted the username xl but someone registered it the day before (the day before!) me on hn.
- doctorpangloss 3y ago> the Python part faded away and we ended up enabling JavaScript Custom Functions in Excel instead. Nobody could have anticipated that GPT4 would author Python better than anything else. Nonetheless, I kind of just want Google Drive except Excel, without adopting anything more than the Office ecosystem, that just works with simultaneous editing.
- bubblebobble 3y agoThis is so weird. I built a working "python within excel" a few years back. (it also did sql and matlab&r remotely) Abandoned now: https://alphawolfxl.com/ https://alphawolfxl.com/ I abandoned this when some people I asked to beta test it said "their company wouldn't pay for it" and gave me the impression I'd wasted my time.... ....Not sure how to feel about this.....
- kosolam 3y agoDon’t feel too bad because if you would have created a product from it, today this product would be deprecated..
- fzumstein 3y agoI don't think that's necessarily true. They built VSTO for C#, but everybody was using ExcelDNA instead, an Open Source solution that was much better!
- kosolam 3y agoBy chance I built quite an interesting addin for excel using VSTO. It was great, nothing to complain about. In the corporate world Microsoft tech is widely common.
- jll29 3y agoYou were just ahead of your time!