Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Spreadsheets using Python - Have you seen this? (sourceforge.net)
97 points by nickpinkston on Nov 9, 2010 | hide | past | favorite | 47 comments



There is also Resolver One. - http://www.resolversystems.com/products/resolver-one/

I have always thought it looked awesome, but is Windows only so I haven't been able to try it.


I tried Resolver One two years ago and it took 2 minutes to launch. I tried it again right now; first launch took 70 seconds and a subsequent launch took 55 seconds. Also, the interface is quite a bit less responsive than Excel. This might help explain its relative obscurity.


Hey ivank. I work at Resolver, and just wanted to say, that's a fair comment. Getting the startup time of Resolver One down has been difficult for us. Our new web-app will fix that for some of our users, and we hope to provide a clear migration from Resolver One to projectdirigible.com for those of our users for whom it makes sense.

Best regards,

Jonathan


The same guys who created Resolver One recently embarked upon a cloud-based, Python spreadsheet application called Dirigible (http://www.projectdirigible.com/).

It looks pretty cool and improves upon Resolver One (for my purposes) by using pure Python (vs. IronPython) and an EC2 back-end to parallelize calcs. It's also obviously cross-platform.

Disclaimer: I don't work for them, just a happy customer.


I did a number of wow theorycrafting spreadsheets (Dorkiest pursuit on Earth!) and found I got more mileage out of the row/column level formulas, named cells, and imports than I did out of the Python integration, which was opposite of what I expected.


There are a bunch of ways you can use Python in excel for windows (I could never get it to work on the mac version, but I couldn't even get Solver to work on the mac version) One goes through the com the other is a plugin of some kind.

What is truly cool about this one though is that you can leave any python object into a cell. Very cool. Its like programming python in a visual functional language. I suspect that this will be abused. "Yo, look at this slick web app that is run through a spreadsheet".

Edit:

I almost forgot my favorite way to write any code in any language for Excel. Remote User Defined Functions. http://msdn.microsoft.com/en-us/library/ff475859.aspx They are bloody awesome and totally asynchronous in Excel 2010.


I don't use Excel though - Mac Numbers, OO:Spreadsheets, or gDocs. Sounds sweet though.

I think a "slick web app through a spreadsheet" is a beautiful thing for noobs like me. If "business guys" were able to mock up sites like they make Excel sheets, I think the world of programming would be better off. This is the modern version of full literacy!

Haha - why is Mac Numbers so buggy and lame?!? KeyNote is awesome, but I guess none of the UXers at Apple use spreadsheets... They don't even have freaking trendlines on the charts - for shame.


I swear I have seen the web-spreadsheet-as-website idea on here before. It was not editgrid.com, which amusingly replicates Excel all the way down to the Windows 95 scroll bars. It was actually focused on making the spreadsheets presentable as public pages with live datasources. The site for the tool was made with the tool. Does anybody know what I'm referring to?


Rings a bell, I think I have it bookmarked at home, I'll see if I can find it.



It was indeed - I always available for a chat if anyone wants :) gordon@hypernumbers.com


Yup, that is it.


Yep, thanks.


I had hoped that Apple would make Python or Ruby a scripting language in iWork. Then again, I thought Numbers would be a real spreadsheet (no linked sheets, no data sources, etc).

I do use Google Docs quite a bit. I could see Google releasing a Python-esque DSL.


I'm a not-very-technical (I can do some coding) co-founder, but I've always been pissed off that Excel doesn't use a normal programming language because I think I'd pickup that language so quickly!

Anyone else interested in something like this? I just stumbled across it and wanted to get people's thoughts.


Funny you should mention that. I use Excel+Python extensively and have developed my own plugin for embedding Python in Excel. Basically it lets me easily write worksheet functions using Python, and also with some multiprocessing magic lets me calculate them in parallel (which VBA doesn't let you do).

I was debating whether I should clean it up enough to share it (or maybe even sell it!). Seems like there's some interest in this, so maybe I will.


You should! I really would prefer Python over VBA for my Excel programming.


http://common-lisp.net/project/cells/ (Cells) is a data flow language where values are determined by formulas similar to spreadsheets.

So instead of a spreadsheet with a programming language, go the other way around!


You don't even need to leave Python:

http://pycells.pdxcb.net/

It's worked for the various things I've done with it, but as far as I know it's not maintained.


Well, Excel does have VBA. Whether that's a "normal" programming language depends on your definition of "normal." You can do some very useful stuff in it, but you'll feel like you're fighting the language every step of the way.


Yeah, I've coded for Word since Word 6.0 in the mid-90's, and it has always been my feeling that Microsoft doesn't want to make things programmable so much as they want you to think things are programmable. It's a feeling that's hard to verbalize exactly.


I don't disagree with you at all, but that's what makes it even more strange that VB has become so much more popular than I expected for enterprise usage. Did Microsoft's marketing muscle pave the way, or were other tools really just too complex for what these people (business analysts, business logic developers, etc) needed?


Let's say you are a cubicle-dwellling enterprise schulb. You have a repetitive task to perform. Do you:

1) Spend 3 weeks requesting permission to install your favorite programming tools

2) Look around your Start Menu, suck it up and code it in Excel.

(That is ignoring VB's tight integration, first mover advantage, and the fact that an entire generation of kids grew up coding MS-BASIC.)


This takes me back to my last (long term) job. I got tapped to fix a departed worker's spaghetti code, and in the process, got VERY familiar with Excel VBA, to the point that I started goofing around with my own ideas. I must have dozens of "empty" spreadsheets with nothing but code in them. What's fun is, you can drag in just about any COM library on the system to play around with.

For a spreadsheet, Excel's a not-too-bad IDE!


It's 1994, Windows for Workgroups is on your computer connected to the other machines on the LAN via a Novell Network. No WAN. Word 6, Access 1.0, Excel 1.0. VBA is all you've got.


Yea, I did VB in high school, but it didn't take...

As I was Exceling it up tonight, and I thought to myself if I used Python as the spreadsheet language I'd be quite good by now. Excel feels like an extension of my body - I want Python to feel that way.

To be honest, my first thought was having a Scheme-based spreadsheet. I'm already used to lots of parenthesis and Excel script is sort of functional already. Not sure it'd work though.

I keep thinking that Python(Scheme?) + Spreadsheets = what Yahoo Pipes wishes it was. gDoc's ability to pull from APIs and data functions was a good step as well in this regard.

At least making programming a step closer for noobs like myself.


> To be honest, my first thought was having a Scheme-based spreadsheet. I'm already used to lots of parenthesis and Excel script is sort of functional already. Not sure it'd work though.

You may be interested in the "Siag" spreadsheet tool, which stands for "Scheme In A Grid": http://siag.nu/siag/


You can use Excel / Word as a COM object and use any language that does COM.


I used COM and the Python Win32 API to automate Excel, creating reports from data in an MSDE DB. We did this quite extensively at my first job.


For serious data analysis and CSV manipulation work in Python another library to check out is Tabular:

http://www.parsemydata.com/tabular/

It's built on top of Numpy so it's very fast and plays well with the rest of the Numpy/Scipy ecosystem. I've been using it daily for the last couple of weeks on relatively large data sets (>300MB) and have been very pleased with how elegantly and efficiently it handles things like pivot, join and aggregation.


Writing spreadsheets and other tabular data formats for Python is very simple with my Tablib library (http://tablib.org).


This is pretty sweet. I see it has CSV and Excel export... I'll definitely have to check this out. Thanks for posting / building this!


How does it deal with dependencies between cells? How does it figure out what order to update them in?


I'd suspect that there's a listing somewhere that says, for a given cell, what other cells depend on it, so it knows to update the others when it's modified. I can't immediately get it to work on my Mac, so I can't test it out, though.

There is a line in the source (_datastructures.py) that generates a KeyError("Circular dependency at %s" % str(key)), so I'd guess that it won't let you do anything that generate cycles on the dependency graph. And once the graph is acyclic, it should be fairly obvious in what order to update things.


The standard technique is to keep a directed graph with an edge from a cell to each cell that depends on it, then propagate changes recursively. This works well when the total number of cells isn't large.


Right, but that only works if when looking at a formula you can figure out which other cell it refers to. I guess I asked what I asked because I hoped having Python would let you use computed references --something like cell(x,y) where x and y are expressions computing the row and column, or even eval(str) where the str is a formula that refers to some cells.


Somehow I didn't see your reply till now.

It turns out this problem of computed cell references is a nontrivial one. (Excel can do it, but slowly and I suspect not with full generality.) The trouble is that you need the reference graph to compute the spreadsheet, but now computing the spreadsheet can modify the reference graph, so you have to maintain the graph dynamically as you calculate.

I'd be interested in discussing this further if you are, but email would be better than here. (My address is in my profile.)


If this could do a basic scatter plot and/or Line graph. I would never need another spreadsheet.


Looks like the recommended way (according to the tutorial) is to use RPy. I imagine there is some support for pyplot, too, given the Numpy/Scipy integration.


Spreadsheets with python . . cackles evilly . can you feel the POWER!

In all serious I play with data in CSV format with python all the time so this could be extremely useful especially when I want to automate something spreadsheet related for a client/friend/coworker.


See my other comment (http://news.ycombinator.com/item?id=1885543) - I use Excel+Python all the time, and yes, it's freakin' awesome.


There is also PyXLL, which allows you to call python from Excel. http://www.pyxll.com


I wrote one using a LISP dialect a few years back. I still like the idea. :)


this is amazing, what do they use for user interface framework, is it wxpython?


Writing spreadsheets and other tabular data formats for Python is very simple with my Tablib library (http://tablib.org).


see also Scheme in a Grid http://siag.nu/siag/


nice




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: