Live data from Hacker News

Show HN: Script Excel with Python

ironspread.com

61–63 of 63 posts

Re: Show HN: Script Excel with Python

#61
If you want to call Python functions from Excel in the form of user defined functions, macros or menu functions (including macros bound to UI widgets and application events) you should take a look at PyXLL (www.pyxll.com).

This has been around for a couple of years now and actively maintained and supported, and is in use by many organisations already. It supports all versions of Excel from 2000 onwards, with some features only available in later versions (eg asynchronous functions are only in Excel 2010).

It uses cPython so all the standard libraries are usable.

Calling back into Excel is quite straightforward using win32com, and there are examples on the website that show how to do that.

With PyXLL you can write plain Python code that you can use outside Excel as well - so it's quite easy to write a library of functions that can be called from normal Python scripts as well as expose them to Excel at the same time.

I'm not sure what this project adds over what's already available but I'd be very interested to hear what other people's opinons are.

Re: Show HN: Script Excel with Python

#62
post #59

This seems pretty great. Any plans for compatibility with Excel 2003 and 2007?

We'll be compatible with 2007 in a day or two. We're not currently planning on supporting 2003, but this might change.

Awesome. You may already know, but a huge proportion of the large finance firms are still stuck with 2003 and from speaking to a few people, they don't seem super ready to change. Given you are planning on selling it, these guys would probably be decent customers.
Post reply on HN