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;
7 Content-Transfer-Encoding: binary
9 Phpwiki has extented the [[Help:Wikicreole|Wikicreole]] syntax of tables so that some simple
10 spreadsheet-like calculations can be performed in tables.
14 Five functions are available: SUM, AVERAGE, MAX, MIN and COUNT.
16 They operate on the current row (R) or column (C).
18 The function is placed in the cell surrounded by ##@@##.
19 Other wiki text can be placed in the cell, but there can be only one formula per cell.
25 | @@=SUM(R)@@ || Sum of cells in current row
27 | @@=SUM(C)@@ || Sum of cells in current column
29 | @@=AVERAGE(R)@@ || Average of cells in current row
31 | @@=AVERAGE(C)@@ || Average of cells in current column
33 | @@=MAX(R)@@ || Maximum value of cells in current row
35 | @@=MAX(C)@@ || Maximum value of cells in current column
37 | @@=MIN(R)@@ || Minimum value of cells in current row
39 | @@=MIN(C)@@ || Minimum value of cells in current column
42 | Number of cells in current row (numeric or not, excluding headers and current cell)
45 | Number of cells in current column (numeric or not, excluding headers and current cell)
53 |=Region |=Telecom Sales |=Power Sales |=Other |=TOTAL |
54 |=Europe | 320 | 80 | 120 |@@=SUM(R)@@ |
55 |=Asia | 580 | 723 | 564 |@@=SUM(R)@@ |
56 |=North America | 235 | 60 | 109 |@@=SUM(R)@@ |
57 |=South America | 120 | 35 | 82 |@@=SUM(R)@@ |
58 |=Antarctica | 0 | 0 | 12 |@@=SUM(R)@@ |
59 |=TOTAL | @@=SUM(C)@@ | @@=SUM(C)@@ | @@=SUM(C)@@ |Grand total: @@=SUM(R)@@ |
62 |=Region |=Telecom Sales |=Power Sales |=Other |=TOTAL |
63 |=Europe | 320 | 80 | 120 |@@=SUM(R)@@ |
64 |=Asia | 580 | 723 | 564 |@@=SUM(R)@@ |
65 |=North America | 235 | 60 | 109 |@@=SUM(R)@@ |
66 |=South America | 120 | 35 | 82 |@@=SUM(R)@@ |
67 |=Antarctica | 0 | 0 | 12 |@@=SUM(R)@@ |
68 |=TOTAL | @@=SUM(C)@@ | @@=SUM(C)@@ | @@=SUM(C)@@ |Grand total: @@=SUM(R)@@ |
70 Total of both colums and rows is calculated automatically by wiki.
75 |=Bug |=Priority |=Subject |=Status |=Days to fix
76 | 1231 | Low | File Open ... | Open | 3
77 | 1232 | High | Memory Window ... | Fixed | 2
78 | 1233 | Medium | Usability issue ... | Assigned | 5
79 | 1234 | High | No arrange ... | Fixed | 1
80 | Number of bugs: @@=COUNT(C)@@ | | | | Total: @@=SUM(C)@@ days
83 |=Bug |=Priority |=Subject |=Status |=Days to fix
84 | 1231 | Low | File Open ... | Open | 3
85 | 1232 | High | Memory Window ... | Fixed | 2
86 | 1233 | Medium | Usability issue ... | Assigned | 5
87 | 1234 | High | No arrange ... | Fixed | 1
88 | Number of bugs: @@=COUNT(C)@@ | | | | Total: @@=SUM(C)@@ days
90 === Min, Max and Average ===
93 |=Location |=Morning |=Noon |=Evening |=Average temperature |
94 | Paris | 7 | 13 | 10 | @@=AVERAGE(R)@@ |
95 | London | 3 | 10 | 8 | @@=AVERAGE(R)@@ |
96 | Berlin | 9 | 15 | 12 | @@=AVERAGE(R)@@ |
97 | Tokyo | 12 | 20 | 16 | @@=AVERAGE(R)@@ |
98 | Maximum temperature | @@=MAX(C)@@ | @@=MAX(C)@@ | @@=MAX(C)@@ | |
99 | Minimum temperature | @@=MIN(C)@@ | @@=MIN(C)@@ | @@=MIN(C)@@ | |
102 |=Location |=Morning |=Noon |=Evening |=Average temperature |
103 | Paris | 7 | 13 | 10 | @@=AVERAGE(R)@@ |
104 | London | 3 | 10 | 8 | @@=AVERAGE(R)@@ |
105 | Berlin | 9 | 15 | 12 | @@=AVERAGE(R)@@ |
106 | Tokyo | 12 | 20 | 16 | @@=AVERAGE(R)@@ |
107 | Maximum temperature | @@=MAX(C)@@ | @@=MAX(C)@@ | @@=MAX(C)@@ | |
108 | Minimum temperature | @@=MIN(C)@@ | @@=MIN(C)@@ | @@=MIN(C)@@ | |
112 The formulas are evaluated line per line, from left to right.
117 | 10 | -13 | @@=SUM(R)@@ |
118 | 15 | 17 | @@=SUM(R)@@ |
119 | @@=SUM(C)@@ | @@=SUM(C)@@ | @@=SUM(R)@@ |
122 | 10 | -13 | @@=SUM(R)@@ |
123 | 15 | 17 | @@=SUM(R)@@ |
124 | @@=SUM(C)@@ | @@=SUM(C)@@ | @@=SUM(R)@@ |
129 | @@=SUM(R)@@ | 10 | -13 |
130 | @@=SUM(R)@@ | 15 | 17 |
131 | @@=SUM(R)@@ | @@=SUM(C)@@ | @@=SUM(C)@@ |
134 | @@=SUM(R)@@ | 10 | -13 |
135 | @@=SUM(R)@@ | 15 | 17 |
136 | @@=SUM(R)@@ | @@=SUM(C)@@ | @@=SUM(C)@@ |
140 * Marc-Etienne Vargenau, Alcatel-Lucent
144 [[PhpWikiDocumentation]]