Show HN: Script Excel with Python
ironspread.com
ironspread.com
Video: http://www.youtube.com/watch?v=Oi3QKuFugWk&hd=1
edit - link to project: http://pytools.codeplex.com
My understanding of the difference between the links: Pytools in general lets you run Python programs in Visual Studio. Pyvot is a part of Pytools that lets any Python code on Windows (including code run in Visual Studio) connect to Excel.
We're also backwards compatible - you can keep running old VBA code, and write new scripts in Python.
I expect IronSpread will see much more use than ResolverOne because it will integrate into these offices more easily.
Also see PyXLL (http://pyxll.com/), which lets you write Excel plugins in Python (CPython).
Just saw this example - http://dpinte.wordpress.com/2010/03/12/interactive-python-gr...
COM isn't hot new technology, but it works, costs $0 above and beyond Excel, and can access as much (or more) of Excel.
The reason I ask is that after a quick look, the IronSpread examples don't look too much different than accessing Excel via plain old COM. [1]
And there's even a chapter in a book [2] for accessing Excel from Python through COM.
And example code [3] for wrapping Excel COM in a Python class.
I guess put another way, my question would be what does IronSpread offer above and beyond the regular access from COM?
[1] http://stackoverflow.com/questions/441758/driving-excel-from... (the second answer)
FTFY
Implement billing. Now. No excuses.
It depends on what you're doing, though.
http://stackoverflow.com/a/445961
Though I admit scripting Excel from Python should be easier to setup than it is.
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.
It's backwards compatible too - you can run VBA scripts and Python scripts at the same time.
You guys have a bright future in front of you.
Is there anything out there that allows using C# to script/control excel?
Would it be possible to use this as a standalone (command line for instance) and not a plugin?
References:
[1] https://developer.apple.com/library/mac/#documentation/apple...
[2] http://appscript.sourceforge.net/py-appscript/index.html
[3] http://rubyosa.rubyforge.org/
[4] http://appscript.sourceforge.net/tools.html#asdictionary
Code.google.com/p/pyinex
O.83 alpha version includes the code.