What's the status of formula support? There are recent messages saying
it's in an early stage of development: message from Andy Oliver on March
7th suggests you still have to write the parser.

I've been developing a spreadsheet compiler/decompiler, and as part of
this, I have code to read and write SLK files. These are a lot simpler
than XLS (basically, one command per line, plain text and standard
notation for formulae, plus a few special tags), but perhaps my code could
be useful to you?

The parser is written with the JavaCC parser-generator, see
http://www.webgain.com/products/java_cc/ . This is relatively easy to use
- standard declarative notation for syntax, plus semantic rules written in
Java - and comes with a number of examples. It's also free. I parse
formulae into trees, the standard way to represent expressions in compiler
writing. I've also written a module that converts these trees back into
strings, used when writing the formulae back out.

If any of this is useful, I'm happy to donate the code. It would need some
adapting, but it would get you a fair way there, especially with the
parser. One of the things I've used it for is an 'Autopublisher' to which
one can submit spreadsheets and have them automatically converted into Web
pages plus server-side code to evaluate the spreadsheet. This reads SLK
files and uses the formulae in several ways: to be analysed for cell
dependencies, to be evaluated, and to be decompiled into a summary of the
calculations, so shows that my representation can be used in a variety of
ways.

Jocelyn Paine
 http://www.ifs.org.uk/~popx/

Spreadsheet Autopublisher:
 http://www.bized.ac.uk/virtual/vla/autopublisher/

Model Master spreadsheet tools:
 http://www.ifs.org.uk/~popx/mm_publications.html


Reply via email to