sctable
PURPOSE
This processor is used to do some spread sheet calculation based on sc in a regular wiki table. The first column/first line coordinate is A0.
CALLING SEQUENCE
{ { {
#!sctable [-column_header -row_header -show_formular ]
} } }
INPUTS
-column_header : additional in the result the column header is shown
-row_header : additional in the result the line number header is shown
-show_formular : if set the formular instead of the result is shown, data is arranged in textmode. Blanks in formulars are removed
EXAMPLE
{ { { #!sctable ||1||2||=A0+B0|| ||10||20||=@sum(A1:B1)|| } } }
RESULT:
1.00 |
2.00 |
3.00 |
10.00 |
20.00 |
30.00 |
{ { { #!sctable ||1||||2||=A0+C0|| } } }
RESULT:
1.00 |
2.00 |
3.00 |
{ { { #!sctable ||1||2||=A0+B0|| ||10||20||=@sum(A1:B1)|| ||=@sum(A0:A1)||=@sum(B0:B1)||=@sum(C0:C1)|| } } }
RESULT:
1.00 |
2.00 |
3.00 |
10.00 |
20.00 |
30.00 |
11.00 |
22.00 |
33.00 |
{ { { #!sctable ||A||B||C|| ||1||2||=A1+B1|| ||10||20||=@sum(A2:B2)|| ||=@sum(A1:A2)||=@sum(B1:B2)||=@sum(C1:C2)|| } } }
RESULT:
A |
B |
C |
1.00 |
2.00 |
3.00 |
10.00 |
20.00 |
30.00 |
11.00 |
22.00 |
33.00 |
{ { { #!sctable -column_header ||1||2|| ||3||4|| ||5||6|| } } }
RESULT:
A |
B |
1.00 |
2.00 |
3.00 |
4.00 |
5.00 |
6.00 |
{ { { #!sctable -row_header ||1||2|| ||3||4|| ||5||6|| } } }
RESULT:
0 |
1.00 |
2.00 |
1 |
3.00 |
4.00 |
2 |
5.00 |
6.00 |
{ { { #!sctable -column_header -row_header ||1||2|| ||3||4|| ||5||6|| } } }
RESULT:
|
A |
B |
0 |
1.00 |
2.00 |
1 |
3.00 |
4.00 |
2 |
5.00 |
6.00 |
{ { { #!sctable -show_formular -column_header -row_header ||m||p|| ||1||=A1 * 5|| ||2||=A2-3|| ||3||4|| } } }
RESULT:
|
A |
B |
0 |
m |
p |
1 |
1 |
=A1*5 |
2 |
2 |
=A2-3 |
3 |
3 |
4 |
{ { { #!sctable -column_header ||Name Vorname|| || || 3 || || 5|| ||Name Vorname|| 1 || 2 || || 4 || 5|| ||Name Vorname|| 1 || 2 || || || 5|| } }
RESULT:
A |
B |
C |
D |
E |
F |
Name Vorname |
|
|
3 |
|
5 |
Name Vorname |
1 |
2 |
|
4 |
5 |
Name Vorname |
1 |
2 |
|
|
5 |
PROCEDURE
This processor needs the external sc (http://freshmeat.net/projects/sc/) routine.
- check if in the data dir of your wiki a directory tmp is created with write permissions to the httpd_user name. e.g.
/usr/share/moin/mywiki/data/tmp drwxr-xr-x 2 wwwrun nogroup 48 2004-04-09 18:57 tmp
- All formulars have to start by a "=" sign.
- builtin functions starts with a "=@" sign, please look at the sc description for the list of functions
- text in the cells is printed to the left and numbers to the right
- Please remove the version number from the routine name!
MODIFICATION
@copyright: 2004-09-19 by Reimar Bauer (R.Bauer@fz-juelich.de) sctable-1.2.3-1
1.2.3-2 : 2004-09-19 (RB) bug fixed: line #!sctable was not found by giving input parameters 1.2.3-3 : (RB) input parameter -show_formular added, column width is set to 200 chars : if this parameter is used : (RB) bug removed (already) #!sctable position could be different from 0 : but always greater -1 1.2.3-4 : 2004-10-05 (RB) format always extended for sc call to 200 signs. bug with blanks in names removed, more as one blank in a cell handled as one blank.
DISCUSSION
we need a better routine to destinguish between strings and numbers -- ReimarBauer 2004-09-19 17:52:44