a spreadsheet kort program example
Here is a spreadsheet program in 293 lines of code
where 143 lines just list columns like A1, A2,.. Program runs in top of
kort glue and is kind a
"proof of concept" type program because it has some severe limitations like
- Sheet size is A1:G20 and no more. It might be easy to expand to be
something "real" like "virtually unlimited" but that does not fit to 293
lines of code.
- "Range" type functions currently include sum and avg and no other
functions are supported. Others like min and max and stddev might
be very easy to add but that does not fit to 293 lines of code.
On the other hand there are interesting features:
- Any mathematical operation supported by tcl expr is supported, including
rand() for real business plans.
- Spreadsheet is truly multiuser with unlimited number of users, if your
computer hw just can handle that. The program is quite light-weigth.
- Strings are in unicode.
In action the program looks like this
and it
requires these mysql tables in db name kort
in order to be run.
It has dubious syntax where cells in formulas need to be referenced as
$::A1 and not A1 manner and where ' (single quote) is not supported in any
string and where strings begin with double quote. Sum is expressed like
[ sc_sum A1 A7 ] and that calculates sum from A1 to A7 and it has
most likely 16 bugs. Note that formulas do not begin with = as in some
other spreadsheet calculators, here everything is a formula, even if
it is a single character, with exception of a string that begins with
a double quote (").
Antti Järvinen
Last modified: Fri Jun 3 22:44:44 EEST 2005