1 Date: Fri, 10 Sep 2010 13:46:13 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0)
3 Content-Type: application/x-phpwiki;
4 pagename=Help%2FSpreadsheet;
5 flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
8 Content-Transfer-Encoding: binary
10 Phpwiki has extented the [[Help:Wikicreole|Wikicreole]] syntax of tables so that some simple
11 spreadsheet-like calculations can be performed in tables.
15 Five functions are available: SUM, AVERAGE, MAX, MIN and COUNT.
17 They operate on the current row (R) or column (C).
19 The function is placed in the cell surrounded by ##@@##.
20 Other wiki text can be placed in the cell, but there can be only one formula per cell.
26 | @@=SUM(R)@@ || Sum of cells in current row
28 | @@=SUM(C)@@ || Sum of cells in current column
30 | @@=AVERAGE(R)@@ || Average of cells in current row
32 | @@=AVERAGE(C)@@ || Average of cells in current column
34 | @@=MAX(R)@@ || Maximum value of cells in current row
36 | @@=MAX(C)@@ || Maximum value of cells in current column
38 | @@=MIN(R)@@ || Minimum value of cells in current row
40 | @@=MIN(C)@@ || Minimum value of cells in current column
43 | Number of cells in current row (numeric or not, excluding headers and current cell)
46 | Number of cells in current column (numeric or not, excluding headers and current cell)
54 |=Region |=Telecom Sales |=Power Sales |=Other |=TOTAL |
55 |=Europe | 320 | 80 | 120 |@@=SUM(R)@@ |
56 |=Asia | 580 | 723 | 564 |@@=SUM(R)@@ |
57 |=North America | 235 | 60 | 109 |@@=SUM(R)@@ |
58 |=South America | 120 | 35 | 82 |@@=SUM(R)@@ |
59 |=Antarctica | 0 | 0 | 12 |@@=SUM(R)@@ |
60 |=TOTAL | @@=SUM(C)@@ | @@=SUM(C)@@ | @@=SUM(C)@@ |Grand total: @@=SUM(R)@@ |
63 |=Region |=Telecom Sales |=Power Sales |=Other |=TOTAL |
64 |=Europe | 320 | 80 | 120 |@@=SUM(R)@@ |
65 |=Asia | 580 | 723 | 564 |@@=SUM(R)@@ |
66 |=North America | 235 | 60 | 109 |@@=SUM(R)@@ |
67 |=South America | 120 | 35 | 82 |@@=SUM(R)@@ |
68 |=Antarctica | 0 | 0 | 12 |@@=SUM(R)@@ |
69 |=TOTAL | @@=SUM(C)@@ | @@=SUM(C)@@ | @@=SUM(C)@@ |Grand total: @@=SUM(R)@@ |
71 Total of both colums and rows is calculated automatically by wiki.
76 |=Bug |=Priority |=Subject |=Status |=Days to fix
77 | 1231 | Low | File Open ... | Open | 3
78 | 1232 | High | Memory Window ... | Fixed | 2
79 | 1233 | Medium | Usability issue ... | Assigned | 5
80 | 1234 | High | No arrange ... | Fixed | 1
81 | Number of bugs: @@=COUNT(C)@@ | | | | Total: @@=SUM(C)@@ days
84 |=Bug |=Priority |=Subject |=Status |=Days to fix
85 | 1231 | Low | File Open ... | Open | 3
86 | 1232 | High | Memory Window ... | Fixed | 2
87 | 1233 | Medium | Usability issue ... | Assigned | 5
88 | 1234 | High | No arrange ... | Fixed | 1
89 | Number of bugs: @@=COUNT(C)@@ | | | | Total: @@=SUM(C)@@ days
91 === Min, Max and Average ===
94 |=Location |=Morning |=Noon |=Evening |=Average temperature |
95 | Paris | 7 | 13 | 10 | @@=AVERAGE(R)@@ |
96 | London | 3 | 10 | 8 | @@=AVERAGE(R)@@ |
97 | Berlin | 9 | 15 | 12 | @@=AVERAGE(R)@@ |
98 | Tokyo | 12 | 20 | 16 | @@=AVERAGE(R)@@ |
99 | Maximum temperature | @@=MAX(C)@@ | @@=MAX(C)@@ | @@=MAX(C)@@ | |
100 | Minimum temperature | @@=MIN(C)@@ | @@=MIN(C)@@ | @@=MIN(C)@@ | |
103 |=Location |=Morning |=Noon |=Evening |=Average temperature |
104 | Paris | 7 | 13 | 10 | @@=AVERAGE(R)@@ |
105 | London | 3 | 10 | 8 | @@=AVERAGE(R)@@ |
106 | Berlin | 9 | 15 | 12 | @@=AVERAGE(R)@@ |
107 | Tokyo | 12 | 20 | 16 | @@=AVERAGE(R)@@ |
108 | Maximum temperature | @@=MAX(C)@@ | @@=MAX(C)@@ | @@=MAX(C)@@ | |
109 | Minimum temperature | @@=MIN(C)@@ | @@=MIN(C)@@ | @@=MIN(C)@@ | |
113 The formulas are evaluated line per line, from left to right.
118 | 10 | -13 | @@=SUM(R)@@ |
119 | 15 | 17 | @@=SUM(R)@@ |
120 | @@=SUM(C)@@ | @@=SUM(C)@@ | @@=SUM(R)@@ |
123 | 10 | -13 | @@=SUM(R)@@ |
124 | 15 | 17 | @@=SUM(R)@@ |
125 | @@=SUM(C)@@ | @@=SUM(C)@@ | @@=SUM(R)@@ |
130 | @@=SUM(R)@@ | 10 | -13 |
131 | @@=SUM(R)@@ | 15 | 17 |
132 | @@=SUM(R)@@ | @@=SUM(C)@@ | @@=SUM(C)@@ |
135 | @@=SUM(R)@@ | 10 | -13 |
136 | @@=SUM(R)@@ | 15 | 17 |
137 | @@=SUM(R)@@ | @@=SUM(C)@@ | @@=SUM(C)@@ |
141 * Marc-Etienne Vargenau, Alcatel-Lucent
145 [[PhpWikiDocumentation]]