r/excel • 8 • 6d ago

Plugin Python embedded in Excel

Hi All,

This weekend for a bit of fun I built a free / source-available Excel add-in which hosts it's own Python runtime.

You can find a feature runtime and installation guide on the website:

https://sancarn.github.io/xll-python/index.html

fork it here: https://github.com/sancarn/xll-python

But here's an overview:

  • You can write user defined functions which execute like formula.
  • Returning a generator will make the result update every time it yield's a result.
  • You can write macros (e.g. reading / writing CSVs/databases from disk etc.)
  • There's an in-built IDE
  • You can debug formula in the IDE
  • There's a console/REPL where you can experiment with the available runtime
  • There's a package manager where you can install pip packages
  • There's a compiler so you can compile your own scripts into standalone .xll addins.

Hope you find this helpful! ~Sancarn

Edit: This project is AI:X. All code written by Astra & Sol 6.2; albeit with a lot of steering.

11 Upvotes

29 comments sorted by

View all comments

7

u/Think-Excitement-851 5d ago

Why? Excel has a functional language

5

u/bob_f332 5d ago

And python too, iirc.

2

u/small_trunks 1638 5d ago

And Typescript in Office Scripts

0

u/sancarn 8 5d ago edited 5d ago

VBA? I love VBA, but VBA does have issues. Believe it or not, Python is one of my least favourite programming languages πŸ˜…, but I know this has been a desired feature for years, and I had an idea as to how it could be implemented. So, I gave it a go πŸ‘

3

u/Fearless_Parking_436 4d ago

Isn’t it built in?