2007.04.26 09:26 AM
Excel Formula Parsing News
I've attached an updated version of the port, along with a colourised HTML version. Since Python is indentation-sensitive I'd really appreciate it if you could put both copies up on the blog; it will make the port much more accessible to fans of the snake.
I've used the excel formula parser to help with a tool that converts Excel workbooks into standalone (no Excel - or Windows -required) python programs. They use an inhouse dependency tracking library (to handle A1=B1+C1 where A1 depends on B1 and C1. Change the value of B1 and the value of A1 also changes) but could just as easily use something like Cells/pyCells (see e.g. http://pycells.pdxcb.net/). This allows us to effectively stick the functionality of legacy xls files on a big-iron unix web-server as CGI. Getting a token stream was the first (and hardest) step, so again, a BIG thanks.
I've now got to try and do the same with old Lisp code!
I couldn't get my CSS and TypePad template to play nicely with Robin's HTML, so I'm just going to link to the files: here's the colorized HTML and here's the actual Python code. Also, if you're interested in this kind of thing, I urge you to check out the PyCells link that Robin provided - pretty cool stuff. Robin, thanks again for sharing this with everyone.
A test comment, please ignore.
Carla | 2007.04.30 02:56 PM
ewbi.develops | 2010.01.11 07:57 PM
Note that Excel files store formulas in a byte-code form. When loaded in Excel, the formulas are translated into a text form that may be specific to the locale. An alternative might be to use a library that reads Excel files directly. E.g. xlrd for Python--although its formula parsing is experimental.
Craig McQueen | 2010.02.18 01:53 AM
TrackBack URL: http://www.typepad.com/services/trackback/6a00d8341c7bd453ef00d834aeaf2869e2
Listed below are links to weblogs that reference Excel Formula Parsing News: