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