TWiki Spreadsheet PluginThis Plugin adds spreadsheet capabilities to KoreaCmsWiki? topics. Formulae like%CALC{"$INT(7/3)"}% are evaluated at page view time. They can be placed in table cells and outside of tables. In other words, this Plugin provides general formula evaluation capability, not just classic spreadsheet functions.
Syntax RulesThe action of this Plugin is triggered by the%CALC{"..."}% variable, which gets rendered according to the built-in function(s) found between the quotes.
Built-in FunctionsConventions for Syntax:
ABOVE( ) -- address range of cells above the current cell
ABS( num ) -- absolute value of a numberAND( list ) -- logical AND of a listAVERAGE( list ) -- average of a list or a range of cells
CHAR( number ) -- ASCII character represented by number
CODE( text ) -- ASCII numeric value of character
COLUMN( offset ) -- current column number
COUNTITEMS( list ) -- count individual items in a list
COUNTSTR( list, str ) -- count the number of cells in a list equal to a given string
DEF( list ) -- find first non-empty list item or cell
EVAL( formula ) -- evaluate a simple mathematical formula
EVEN( num ) -- test for even numberEXACT( text1, text2 ) -- compare two text strings
EXEC( formula ) -- execute a spreadsheet formula
EXISTS( topic ) -- check if topic exists
FIND( string, text, start ) -- find one string within another string
FORMAT( type, prec, number ) -- format a number to a certain type and precision
FORMATTIME( serial, text ) -- convert a serialized date into a date string
FORMATGMTIME( serial, text ) -- convert a serialized date into a GMT date string
GET( name ) -- get the value of a previously set variable
IF( condition, value if true, value if 0 ) -- return a value based on a condition
INT( formula ) -- evaluate formula and round down to nearest integer
LEFT( ) -- address range of cells to the left of the current cell
LENGTH( text ) -- length of text in bytes
LIST( range ) -- convert content of a cell range into a list
LISTIF( condition, list ) -- remove elements from a list that do not meet a condition
LISTITEM( index, list ) -- get one element of a list
LISTJOIN( separator, list ) -- convert a list into a string
LISTMAP( formula, list ) -- evaluate and update each element of a list | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LISTRAND( list ) -- get one random element of a list
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LISTREVERSE( list ) -- opposite order of a list
LISTSIZE( list ) -- number of elements in a list
LISTSHUFFLE( list ) -- shuffle element of a list in random order
LISTSORT( list ) -- sort a list
LISTTRUNCATE( size, list ) -- truncate list to size
LISTUNIQUE( list ) -- remove all duplicates from a list
LOWER( text ) -- lower case string of a text
MAX( list ) - biggest value of a list or range of cells
MEDIAN( list ) -- median of a list or range of cells
MIN( list ) -- smallest value of a list or range of cells
MOD( num, divisor ) -- reminder after dividing |
Bug#: | Priority: | Subject: | Status: | Days to fix |
---|---|---|---|---|
Bug:1231 | Low | File Open ... | Open | 3 |
Bug:1232 | High | Memory Window ... | Fixed | 2 |
Bug:1233 | Medium | Usability issue ... | Assigned | 5 |
Bug:1234 | High | No arrange ... | Fixed | 1 |
Total: 4 | High: 2 Low: 1 Medium: 1 |
. | Assigned: 1 Fixed: 2 Open: 1 |
Total: 11 |
| Total: %CALC{"$ROW(-2)"}% \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% | . \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% \ | Total: %CALC{"$SUM( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% |Above table is created manually. Another Plugin could build the table dynamically, e.g. by pulling data out of a bug tracking system. The Spreadsheet Plugin can be used to display table data statistics.
%<plugin>_<setting>%
, i.e. %SPREADSHEETPLUGIN_SHORTDESCRIPTION%
"$SUM( $ABOVE() )"
to TWiki tables and other topic text
data/debug.txt
) %CALC{}%
variable in included topic while including topic: (default: 1) $PROPERSPACE(text)
function. This comma delimited list can be overloaded by a DONTSPACE preferences variable: SpreadSheetPlugin.zip
in your twiki installation directory. Content: File: | Description: |
---|---|
data/TWiki/SpreadSheetPlugin.txt | Plugin topic |
data/TWiki/SpreadSheetPlugin.txt,v | Plugin topic repository |
lib/TWiki/Plugins/SpreadSheetPlugin.pm | Plugin Perl module |
configure
in your TWiki installation, and enable the Plugin in the {Plugins} section.
Plugin Author: | TWiki:Main/PeterThoeny![]() |
Copyright: | © 2001-2006, Peter@Thoeny.org, StructuredWikis LLC![]() |
Copyright: | © 2001-2007, Peter@Thoeny.org, StructuredWikis LLC![]() |
License: | GPL (GNU General Public License![]() |
Plugin Version: | 18 Dec 2006 (r12315) |
Plugin Version: | 23 Jan 2007 (r12607) |
Change History: | <-- specify latest version first --> |
23 Jan 2007: | Enhanced documentation |
18 Dec 2006: | Added $LISTRAND(), $LISTSHUFFLE(), $LISTTRUNCATE(); fixed spurious newline at end of topic, contributed by TWiki:Main/MichaelDaum![]() |
10 Oct 2006: | Enhanced documentation |
13 May 2006: | Added $SETIFEMPTY(); fixes in documentation |
17 Jun 2005: | Added $NOEXEC(), $EXEC() |
25 Mar 2005: | Fixed evaluation bug when using SpeedyCGI accelerator; code refactor to load module only when needed, contributed by TWiki:Main/CrawfordCurrie![]() |
24 Oct 2004: | Added $EXISTS(), contributed by TWiki:Main/RodrigoChandia![]() |
18 Oct 2004: | Added $LISTJOIN() |
26 Sep 2004: | Added $FORMAT(KB), $FORMAT(MB), contributed by TWiki:Main/ArthurClemens![]() |
17 Jul 2004: | Added $WORKINGDAYS(), contributed by TWiki:Main/CrawfordCurrie![]() |
24 May 2004: | Refactored documentation (no code changes) |
03 Apr 2004: | Added $ABS(), $LISTIF(); fixed $VALUE() to remove leading zeros; changed $FIND() and $SEARCH() to return 0 instead of empty string if no match |
21 Mar 2004: | Added $LISTITEM(); fixed call to unofficial function |
16 Mar 2004: | Added $LISTMAP(), $LISTREVERSE(), $LISTSIZE(), $LISTSORT(), $LISTUNIQUE(), $SETM(); retired $COUNTUNIQUE() in favor of $COUNTITEMS($LISTUNIQUE()); fixed evaluation order issue of $IF(); fixed missing eval error messages suppressed since version 06 Mar 2004; redirect stderr messages to warning |
08 Mar 2004: | Added $LIST() |
06 Mar 2004: | Added $AND(), $MOD(), $NOT(), $OR(), $PRODUCT(), $PROPER(), $PROPERSPACE(), $RAND(), $REPEAT(), $SIGN(), $VALUE(); added digits parameter to $ROUND(); renamed $MULT() to $PRODUCT(); $MULT() is deprecated and undocumented |
27 Feb 2004: | Added $COUNTUNIQUE() |
24 Oct 2003: | Added $SET(), $GET(), $MEDIAN(); added $SUMPRODUCT(), inspired by TWiki:Main/RobertWithrow![]() ![]() |
21 Oct 2003: | Added support for lists (1, 2, 3) and lists of table ranges (R1:C1..R1:C5, R3:C1..R3:C5) for all functions that accept a table range; added $TIMEADD(); in $TIMEDIFF() added week unit; in $FORMATTIME() changed $weekday to $wd and added $wday and $weekday |
14 Oct 2003: | Added $TIME(), $TODAY(), $FORMATTIME(), $FORMATGMTIME(), $TIMEDIFF() |
13 Oct 2003: | Added $MULT(), contributed by TWiki:Main/GerritJanBaarda![]() |
30 Jul 2003: | Added $TRANSLATE() |
19 Jul 2003: | Added $FIND(), $NOP(), $REPLACE(), $SEARCH(), $SUBSTITUTE(), contributed by TWiki:Main/PaulineCheung![]() |
19 Apr 2003: | Added $COUNTSTR(), $EXACT(), $IF(), $ROUND(), $TRIM(); added $FORMAT(), contributed by TWiki:Main/JimStraus![]() % modulus operator in $EVAL(), $INT(), and $ROUND(); fixed bug in $DEF() |
07 Jun 2002: | Added $DEF(), contributed by TWiki:Main/MartinFuzzey![]() <u>102</u> , suggested by TWiki:Main/GladeDiviney![]() |
12 Mar 2002: | Support for multiple functions per nesting level |
15 Jan 2002: | Added $CHAR(), $CODE() and $LENGTH() |
12 Nov 2001: | Added $RIGHT() |
12 Aug 2001: | Fixed bug of disappearing multi-column cells |
19 Jul 2001: | Fixed incorrect $SUM() calculation of cell with value 0 |
14 Jul 2001: | Changed to plug & play |
01 Jun 2001: | Fixed insecure dependencies for $MIN() and $MAX() |
16 Apr 2001: | Fixed div by 0 bug in $AVERAGE() |
17 Mar 2001: | Initial version with $ABOVE(), $AVERAGE(), $COLUMN(), $COUNTITEMS(), $EVAL(), $INT(), $LEFT(), $LOWER(), $MAX(), $MIN(), $ROW(), $SUM(), $T(), $UPPER() |
CPAN Dependencies: | none |
TWiki:Plugins/Benchmark![]() |
GoodStyle 99%, FormattedSearch 99%, SpreadSheetPlugin 95% |
Other Dependencies: | none |
Perl Version: | 5.000 and up |
Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/SpreadSheetPlugin![]() |
Feedback: | http://TWiki.org/cgi-bin/view/Plugins/SpreadSheetPluginDev![]() |
Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/SpreadSheetPluginAppraisal![]() |
TWiki Spreadsheet PluginThis Plugin adds spreadsheet capabilities to KoreaCmsWiki? topics. Formulae like%CALC{"$INT(7/3)"}% are evaluated at page view time. They can be placed in table cells and outside of tables. In other words, this Plugin provides general formula evaluation capability, not just classic spreadsheet functions.
Syntax RulesThe action of this Plugin is triggered by the%CALC{"..."}% variable, which gets rendered according to the built-in function(s) found between the quotes.
Built-in FunctionsConventions for Syntax:
ABOVE( ) -- address range of cells above the current cell
ABS( num ) -- absolute value of a numberAND( list ) -- logical AND of a listAVERAGE( list ) -- average of a list or a range of cells
CHAR( number ) -- ASCII character represented by number
CODE( text ) -- ASCII numeric value of character
COLUMN( offset ) -- current column number
COUNTITEMS( list ) -- count individual items in a list
COUNTSTR( list, str ) -- count the number of cells in a list equal to a given string
DEF( list ) -- find first non-empty list item or cell
EVAL( formula ) -- evaluate a simple mathematical formula
EVEN( num ) -- test for even numberEXACT( text1, text2 ) -- compare two text strings
EXEC( formula ) -- execute a spreadsheet formula
EXISTS( topic ) -- check if topic exists
FIND( string, text, start ) -- find one string within another string
FORMAT( type, prec, number ) -- format a number to a certain type and precision
FORMATTIME( serial, text ) -- convert a serialized date into a date string
FORMATGMTIME( serial, text ) -- convert a serialized date into a GMT date string
GET( name ) -- get the value of a previously set variable
IF( condition, value if true, value if 0 ) -- return a value based on a condition
INT( formula ) -- evaluate formula and round down to nearest integer
LEFT( ) -- address range of cells to the left of the current cell
LENGTH( text ) -- length of text in bytes
LIST( range ) -- convert content of a cell range into a list
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LISTIF( condition, list ) -- remove elements from a list that do not meet a condition
LISTITEM( index, list ) -- get one element of a list
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LISTJOIN( separator, list ) -- convert a list into a string
LISTMAP( formula, list ) -- evaluate and update each element of a list
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
LISTRAND( list ) -- get one random element of a list
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LISTREVERSE( list ) -- opposite order of a list
LISTSIZE( list ) -- number of elements in a list
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
LISTSHUFFLE( list ) -- shuffle element of a list in random order
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LISTSORT( list ) -- sort a list
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
LISTTRUNCATE( size, list ) -- truncate list to size
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LISTUNIQUE( list ) -- remove all duplicates from a list
LOWER( text ) -- lower case string of a text
MAX( list ) - biggest value of a list or range of cells
MEDIAN( list ) -- median of a list or range of cells
MIN( list ) -- smallest value of a list or range of cells
MOD( num, divisor ) -- reminder after dividing | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | REPEAT(text) -- repeat text a number of times
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | REPEAT( text, num ) -- repeat text a number of times
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
REPLACE( text, start, num, new ) -- replace part of a text string
RIGHT( ) -- address range of cells to the right of the current cell
ROUND( formula, digits ) -- round a number
ROW( offset ) -- current row number
SEARCH( string, text, start ) -- search a string within a text
SET( name, value ) -- set a variable for later use
SETIFEMPTY( name, value ) -- set a variable only if empty
SETM( name, formula ) -- update an existing variable based on a formula
SIGN( num ) -- sign of a number
SUBSTITUTE( text, old, new, instance, option ) -- substitute text
SUM( list ) -- sum of a list or range of cells
SUMDAYS( list ) -- sum the days in a list or range of cells
SUMPRODUCT( list, list ) -- scalar product on ranges of cells
T( address ) -- content of a cell
TRANSLATE( text, from, to ) -- translate text from one set of characters to another
TIME( text ) -- convert a date string into a serialized date number
TIMEADD( serial, value, unit ) -- add a value to a serialized date
TIMEDIFF( serial_1, serial_2, unit ) -- time difference between two serialized dates
TODAY( ) -- serialized date of today at midnight GMT
TRIM( text ) -- trim spaces from text
UPPER( text ) -- upper case string of a text
VALUE( text ) -- convert text to number
WORKINGDAYS( serial_1, serial_2 ) -- working days between two serialized dates
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | FAQCan I use CALC in a formatted search?Specifically, how can I output some conditional text in a FormattedSearch? You need to escape the CALC so that it executes once per search hit. This can be done by escaping the% signs of %CALC{...}% with $percnt . For example, to execute $IF($EXACT($formfield(Tested), Yes), %PUBURL%/%TWIKIWEB%/TWikiDocGraphics/choice-yes.gif, %PUBURL%/%TWIKIWEB%/TWikiDocGraphics/choice-no.gif) in the format="" parameter, write this:
%SEARCH{ .... format="| $topic | $percntCALC{$IF($EXACT($formfield(Tested), Yes), %PUBURL%/%TWIKIWEB%/TWikiDocGraphics/choice-yes.gif, %PUBURL%/%TWIKIWEB%/TWikiDocGraphics/choice-no.gif)}$percnt |" }%
How can I easily repeat a formula in a table?To repeat the same formula in all cells of a table row define the formula once in a preferences setting and use that in the CALC. The preferences setting can be hidden in HTML comments. Example:<!-- * Set MYFORMULA = $EVAL($SUBSTITUTE(...etc...)) --> | A | 1 | %CALC{%MYFORMULA%}% | | B | 2 | %CALC{%MYFORMULA%}% | | C | 3 | %CALC{%MYFORMULA%}% | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bug Tracking Example
| Total: %CALC{"$ROW(-2)"}% \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% | . \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% \ | Total: %CALC{"$SUM( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% |Above table is created manually. Another Plugin could build the table dynamically, e.g. by pulling data out of a bug tracking system. The Spreadsheet Plugin can be used to display table data statistics. Plugin SettingsPlugin settings are stored as preferences variables. To reference a plugin setting write%<plugin>_<setting>% , i.e. %SPREADSHEETPLUGIN_SHORTDESCRIPTION%
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Plugin Installation InstructionsNote: You do not need to install anything on the browser to use this plugin. Below installation instructions are for the administrator who needs to install this plugin on the TWiki server.
Plugin Info
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | -- TWiki:Main/PeterThoeny![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | -- TWiki:Main/PeterThoeny![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TWiki Spreadsheet PluginThis Plugin adds spreadsheet capabilities to KoreaCmsWiki? topics. Formulae like%CALC{"$INT(7/3)"}% are evaluated at page view time. They can be placed in table cells and outside of tables. In other words, this Plugin provides general formula evaluation capability, not just classic spreadsheet functions.
Syntax RulesThe action of this Plugin is triggered by the%CALC{"..."}% variable, which gets rendered according to the built-in function(s) found between the quotes.
Built-in FunctionsConventions for Syntax:
ABOVE( ) -- address range of cells above the current cell
ABS( num ) -- absolute value of a number | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | AND( list ) -- logcial AND of a list | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | AND( list ) -- logical AND of a list | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AVERAGE( list ) -- average of a list or a range of cells
CHAR( number ) -- ASCII character represented by number
CODE( text ) -- ASCII numeric value of character
COLUMN( offset ) -- current column number
COUNTITEMS( list ) -- count individual items in a list
COUNTSTR( list, str ) -- count the number of cells in a list equal to a given string
DEF( list ) -- find first non-empty list item or cell
EVAL( formula ) -- evaluate a simple mathematical formula
EVEN( num ) -- test for even numberEXACT( text1, text2 ) -- compare two text strings
EXEC( formula ) -- execute a spreadsheet formula
EXISTS( topic ) -- check if topic exists
FIND( string, text, start ) -- find one string within another string
FORMAT( type, prec, number ) -- format a number to a certain type and precision
FORMATTIME( serial, text ) -- convert a serialized date into a date string
FORMATGMTIME( serial, text ) -- convert a serialized date into a GMT date string
GET( name ) -- get the value of a previously set variable
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
IF( condition, value if true, value if 0 ) -- return a value based on a condition
INT( formula ) -- evaluate formula and round down to nearest integer
LEFT( ) -- address range of cells to the left of the current cell
LENGTH( text ) -- length of text in bytes
LIST( range ) -- convert content of a cell range into a list
LISTIF( condition, list ) -- remove elements from a list that do not meet a condition
LISTITEM( index, list ) -- get one element of a list
LISTJOIN( separator, list ) -- convert a list into a string
LISTMAP( formula, list ) -- evaluate and update each element of a list
LISTREVERSE( list ) -- opposite order of a list
LISTSIZE( list ) -- number of elements in a list
LISTSORT( list ) -- sort a list
LISTUNIQUE( list ) -- remove all duplicates from a list
LOWER( text ) -- lower case string of a text
MAX( list ) - biggest value of a list or range of cells
MEDIAN( list ) -- median of a list or range of cells
MIN( list ) -- smallest value of a list or range of cells
MOD( num, divisor ) -- reminder after dividing | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | OR( list ) -- logcial OR of a list | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | OR( list ) -- logical OR of a list | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PERCENTILE( num, list ) -- percentile of a list or range of cells
PRODUCT( list ) -- product of a list or range of cells
PROPER( text ) -- properly capitalize text
PROPERSPACE( text ) -- properly space out WikiWords
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RAND( max ) -- random number
REPEAT(text) -- repeat text a number of times
REPLACE( text, start, num, new ) -- replace part of a text string
RIGHT( ) -- address range of cells to the right of the current cell
ROUND( formula, digits ) -- round a number
ROW( offset ) -- current row number
SEARCH( string, text, start ) -- search a string within a text
SET( name, value ) -- set a variable for later use | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
SETIFEMPTY( name, value ) -- set a variable only if empty | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SETM( name, formula ) -- update an existing variable based on a formula
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SIGN( num ) -- sign of a number
SUBSTITUTE( text, old, new, instance, option ) -- substitute text
SUM( list ) -- sum of a list or range of cells
SUMDAYS( list ) -- sum the days in a list or range of cells
SUMPRODUCT( list, list ) -- scalar product on ranges of cells
T( address ) -- content of a cell
TRANSLATE( text, from, to ) -- translate text from one set of characters to another
TIME( text ) -- convert a date string into a serialized date number
TIMEADD( serial, value, unit ) -- add a value to a serialized date
TIMEDIFF( serial_1, serial_2, unit ) -- time difference between two serialized dates
TODAY( ) -- serialized date of today at midnight GMT
TRIM( text ) -- trim spaces from text
UPPER( text ) -- upper case string of a text
VALUE( text ) -- convert text to number
WORKINGDAYS( serial_1, serial_2 ) -- working days between two serialized dates
Bug Tracking Example
| Total: %CALC{"$ROW(-2)"}% \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% | . \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% \ | Total: %CALC{"$SUM( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% |Above table is created manually. Another Plugin could build the table dynamically, e.g. by pulling data out of a bug tracking system. The Spreadsheet Plugin can be used to display table data statistics. Plugin SettingsPlugin settings are stored as preferences variables. To reference a plugin setting write%<plugin>_<setting>% , i.e. %SPREADSHEETPLUGIN_SHORTDESCRIPTION%
Plugin Installation InstructionsNote: You do not need to install anything on the browser to use this plugin. Below installation instructions are for the administrator who needs to install this plugin on the TWiki server.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Plugin Info
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Related Topics: TWikiPreferences, TWikiPlugins | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | -- TWiki:Main/PeterThoeny![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | -- TWiki:Main/PeterThoeny![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TWiki Spreadsheet PluginThis Plugin adds spreadsheet capabilities to KoreaCmsWiki? topics. Formulae like%CALC{"$INT(7/3)"}% are evaluated at page view time. They can be placed in table cells and outside of tables. In other words, this Plugin provides general formula evaluation capability, not just classic spreadsheet functions.
Syntax RulesThe action of this Plugin is triggered by the%CALC{"..."}% variable, which gets rendered according to the built-in function(s) found between the quotes.
Built-in FunctionsConventions for Syntax:
ABOVE( ) -- address range of cells above the current cell
ABS( num ) -- absolute value of a numberAND( list ) -- logcial AND of a listAVERAGE( list ) -- average of a list or a range of cells
CHAR( number ) -- ASCII character represented by number
CODE( text ) -- ASCII numeric value of character
COLUMN( offset ) -- current column number
COUNTITEMS( list ) -- count individual items in a list
COUNTSTR( list, str ) -- count the number of cells in a list equal to a given string
DEF( list ) -- find first non-empty list item or cell
EVAL( formula ) -- evaluate a simple mathematical formula
EVEN( num ) -- test for even numberEXACT( text1, text2 ) -- compare two text strings
EXEC( formula ) -- execute a spreadsheet formula
EXISTS( topic ) -- check if topic exists
FIND( string, text, start ) -- find one string within another string
FORMAT( type, prec, number ) -- format a number to a certain type and precision
FORMATTIME( serial, text ) -- convert a serialized date into a date string
FORMATGMTIME( serial, text ) -- convert a serialized date into a GMT date string
GET( name ) -- get the value of a previously set variable
IF( condition, value if true, value if 0 ) -- return a value based on a condition
INT( formula ) -- evaluate formula and round down to nearest integer
LEFT( ) -- address range of cells to the left of the current cell
LENGTH( text ) -- length of text in bytes
LIST( range ) -- convert content of a cell range into a list
LISTIF( condition, list ) -- remove elements from a list that do not meet a condition
LISTITEM( index, list ) -- get one element of a list
LISTJOIN( separator, list ) -- convert a list into a string
LISTMAP( formula, list ) -- evaluate and update each element of a list
LISTREVERSE( list ) -- opposite order of a list
LISTSIZE( list ) -- number of elements in a list
LISTSORT( list ) -- sort a list
LISTUNIQUE( list ) -- remove all duplicates from a list
LOWER( text ) -- lower case string of a text
MAX( list ) - biggest value of a list or range of cells
MEDIAN( list ) -- median of a list or range of cells
MIN( list ) -- smallest value of a list or range of cells
MOD( num, divisor ) -- reminder after dividing |
Bug#: | Priority: | Subject: | Status: | Days to fix |
---|---|---|---|---|
Bug:1231 | Low | File Open ... | Open | 3 |
Bug:1232 | High | Memory Window ... | Fixed | 2 |
Bug:1233 | Medium | Usability issue ... | Assigned | 5 |
Bug:1234 | High | No arrange ... | Fixed | 1 |
Total: 4 | High: 2 Low: 1 Medium: 1 |
. | Assigned: 1 Fixed: 2 Open: 1 |
Total: 11 |
| Total: %CALC{"$ROW(-2)"}% \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% | . \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% \ | Total: %CALC{"$SUM( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% |Above table is created manually. Another Plugin could build the table dynamically, e.g. by pulling data out of a bug tracking system. The Spreadsheet Plugin can be used to display table data statistics.
%<plugin>_<setting>%
, i.e. %SPREADSHEETPLUGIN_SHORTDESCRIPTION%
"$SUM( $ABOVE() )"
to tables located in KoreaCmsWiki? topics.
data/debug.txt
) %CALC{}%
variable in included topic while including topic: (default: 1) $PROPERSPACE(text)
function. This comma delimited list can be overloaded by a DONTSPACE preferences variable: SpreadSheetPlugin.zip
in your twiki installation directory. Content: File: | Description: |
---|---|
data/TWiki/SpreadSheetPlugin.txt | Plugin topic |
data/TWiki/SpreadSheetPlugin.txt,v | Plugin topic repository |
lib/TWiki/Plugins/SpreadSheetPlugin.pm | Plugin Perl module |
configure
in your TWiki installation, and enable the plugin in the {Plugins} section.
Plugin Author: | TWiki:Main/PeterThoeny![]() |
Plugin Version: | 17 Jun 2005 (1.018) |
Change History: | <-- specify latest version first --> |
17 Jun 2005: | Added $NOEXEC(), $EXEC() |
25 Mar 2005: | Fixed evaluation bug when using SpeedyCGI accelerator; code refactor to load module only when needed, contributed by TWiki:Main/CrawfordCurrie![]() |
24 Oct 2004: | Added $EXISTS(), contributed by TWiki:Main/RodrigoChandia![]() |
18 Oct 2004: | Added $LISTJOIN() |
26 Sep 2004: | Added $FORMAT(KB), $FORMAT(MB), contributed by TWiki:Main/ArthurClemens![]() |
17 Jul 2004: | Added $WORKINGDAYS(), contributed by TWiki:Main/CrawfordCurrie![]() |
24 May 2004: | Refactored documentation (no code changes) |
03 Apr 2004: | Added $ABS(), $LISTIF(); fixed $VALUE() to remove leading zeros; changed $FIND() and $SEARCH() to return 0 instead of empty string if no match |
21 Mar 2004: | Added $LISTITEM(); fixed call to unofficial function |
16 Mar 2004: | Added $LISTMAP(), $LISTREVERSE(), $LISTSIZE(), $LISTSORT(), $LISTUNIQUE(), $SETM(); retired $COUNTUNIQUE() in favor of $COUNTITEMS($LISTUNIQUE()); fixed evaluation order issue of $IF(); fixed missing eval error messages suppressed since version 06 Mar 2004; redirect stderr messages to warning |
08 Mar 2004: | Added $LIST() |
06 Mar 2004: | Added $AND(), $MOD(), $NOT(), $OR(), $PRODUCT(), $PROPER(), $PROPERSPACE(), $RAND(), $REPEAT(), $SIGN(), $VALUE(); added digits parameter to $ROUND(); renamed $MULT() to $PRODUCT(); $MULT() is deprecated and undocumented |
27 Feb 2004: | Added $COUNTUNIQUE() |
24 Oct 2003: | Added $SET(), $GET(), $MEDIAN(); added $SUMPRODUCT(), inspired by TWiki:Main/RobertWithrow![]() ![]() |
21 Oct 2003: | Added support for lists (1, 2, 3) and lists of table ranges (R1:C1..R1:C5, R3:C1..R3:C5) for all functions that accept a table range; added $TIMEADD(); in $TIMEDIFF() added week unit; in $FORMATTIME() changed $weekday to $wd and added $wday and $weekday |
14 Oct 2003: | Added $TIME(), $TODAY(), $FORMATTIME(), $FORMATGMTIME(), $TIMEDIFF() |
13 Oct 2003: | Added $MULT(), contributed by TWiki:Main/GerritJanBaarda![]() |
30 Jul 2003: | Added $TRANSLATE() |
19 Jul 2003: | Added $FIND(), $NOP(), $REPLACE(), $SEARCH(), $SUBSTITUTE(), contributed by TWiki:Main/PaulineCheung![]() |
19 Apr 2003: | Added $COUNTSTR(), $EXACT(), $IF(), $ROUND(), $TRIM(); added $FORMAT(), contributed by TWiki:Main/JimStraus![]() % modulus operator in $EVAL(), $INT(), and $ROUND(); fixed bug in $DEF() |
07 Jun 2002: | Added $DEF(), contributed by TWiki:Main/MartinFuzzey![]() <u>102</u> , suggested by TWiki:Main/GladeDiviney![]() |
12 Mar 2002: | Support for multiple functions per nesting level |
15 Jan 2002: | Added $CHAR(), $CODE() and $LENGTH() |
12 Nov 2001: | Added $RIGHT() |
12 Aug 2001: | Fixed bug of disappearing multi-column cells |
19 Jul 2001: | Fixed incorrect $SUM() calculation of cell with value 0 |
14 Jul 2001: | Changed to plug & play |
01 Jun 2001: | Fixed insecure dependencies for $MIN() and $MAX() |
16 Apr 2001: | Fixed div by 0 bug in $AVERAGE() |
17 Mar 2001: | Initial version with $ABOVE(), $AVERAGE(), $COLUMN(), $COUNTITEMS(), $EVAL(), $INT(), $LEFT(), $LOWER(), $MAX(), $MIN(), $ROW(), $SUM(), $T(), $UPPER() |
CPAN Dependencies: | none |
TWiki:Plugins/Benchmark![]() |
GoodStyle 99%, FormattedSearch 99%, SpreadSheetPlugin 95% |
Other Dependencies: | none |
Perl Version: | 5.000 and up |
Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/SpreadSheetPlugin![]() |
Feedback: | http://TWiki.org/cgi-bin/view/Plugins/SpreadSheetPluginDev![]() |
TWiki Spreadsheet Plugin | |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | This Plugin adds speadsheet capabilities to KoreaCmsWiki? topics. Formulae like %CALC{"$INT(7/3)"}% are evaluated at page view time. They can be placed in table cells and outside of tables. In other words, this Plugin provides general formula evaluation capability, not just classic spreadsheet functions. | ||||||||||||||||||||||||||||||
> > | This Plugin adds spreadsheet capabilities to KoreaCmsWiki? topics. Formulae like %CALC{"$INT(7/3)"}% are evaluated at page view time. They can be placed in table cells and outside of tables. In other words, this Plugin provides general formula evaluation capability, not just classic spreadsheet functions. | ||||||||||||||||||||||||||||||
Syntax RulesThe action of this Plugin is triggered by the%CALC{"..."}% variable, which gets rendered according to the built-in function(s) found between the quotes.
Built-in FunctionsConventions for Syntax:
ABOVE( ) -- address range of cells above the current cell
ABS( num ) -- absolute value of a number
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||
AND( list ) -- logcial AND of a listAVERAGE( list ) -- average of a list or a range of cells
CHAR( number ) -- ASCII character represented by number
CODE( text ) -- ASCII numeric value of character
COLUMN( offset ) -- current column number
COUNTITEMS( list ) -- count individual items in a list
COUNTSTR( list, str ) -- count the number of cells in a list equal to a given string
DEF( list ) -- find first non-empty list item or cell
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | EVAL( formula ) -- evaluate a simple formula | ||||||||||||||||||||||||||||||
> > | EVAL( formula ) -- evaluate a simple mathematical formula | ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
EVEN( num ) -- test for even number | ||||||||||||||||||||||||||||||
EXACT( text1, text2 ) -- compare two text strings | |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
EXEC( formula ) -- execute a spreadsheet formula
EXISTS( topic ) -- check if topic exists
| ||||||||||||||||||||||||||||||
FIND( string, text, start ) -- find one string within another string
FORMAT( type, prec, number ) -- format a number to a certain type and precision | |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
FORMATTIME( serial, text ) -- convert a serialized date into a date string
FORMATGMTIME( serial, text ) -- convert a serialized date into a GMT date string
GET( name ) -- get the value of a previously set variable
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||
IF( condition, value if true, value if 0 ) -- return a value based on a condition
INT( formula ) -- evaluate formula and round down to nearest integer
LEFT( ) -- address range of cells to the left of the current cell
LENGTH( text ) -- length of text in bytes
LIST( range ) -- convert content of a cell range into a list
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||
LISTIF( condition, list ) -- remove elements from a list that do not meet a condition
LISTITEM( index, list ) -- get one element of a list
| |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
LISTJOIN( separator, list ) -- convert a list into a string
| ||||||||||||||||||||||||||||||
LISTMAP( formula, list ) -- evaluate and update each element of a list
LISTREVERSE( list ) -- opposite order of a list
LISTSIZE( list ) -- number of elements in a list
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
LISTSORT( list ) -- sort a list
LISTUNIQUE( list ) -- remove all duplicates from a list
LOWER( text ) -- lower case string of a text
MAX( list ) - biggest value of a list or range of cells
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
MEDIAN( list ) -- median of a list or range of cells
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
MIN( list ) -- smallest value of a list or range of cells
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
MOD( num, divisor ) -- reminder after dividing | |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
NOEXEC( formula ) -- do not execute a spreadsheet formula
| ||||||||||||||||||||||||||||||
NOP( text ) -- no-operation
NOT( num ) -- reverse logic of a number | |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
ODD( num ) -- test for odd number | ||||||||||||||||||||||||||||||
OR( list ) -- logcial OR of a list | |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
PERCENTILE( num, list ) -- percentile of a list or range of cells | ||||||||||||||||||||||||||||||
PRODUCT( list ) -- product of a list or range of cells
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | PROPER( text ) -- properly capitalize trxt | ||||||||||||||||||||||||||||||
> > | PROPER( text ) -- properly capitalize text | ||||||||||||||||||||||||||||||
PROPERSPACE( text ) -- properly space out WikiWords
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
RAND( max ) -- random number
REPEAT(text) -- repeat text a number of times
REPLACE( text, start, num, new ) -- replace part of a text string
RIGHT( ) -- address range of cells to the right of the current cell
ROUND( formula, digits ) -- round a number
ROW( offset ) -- current row number
SEARCH( string, text, start ) -- search a string within a text
SET( name, value ) -- set a variable for later use | |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||
SETM( name, formula ) -- update an existing variable based on a formula
SIGN( num ) -- sign of a number
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||
SUBSTITUTE( text, old, new, instance, option ) -- substitute text
SUM( list ) -- sum of a list or range of cells
SUMDAYS( list ) -- sum the days in a list or range of cells
SUMPRODUCT( list, list ) -- scalar product on ranges of cells
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
T( address ) -- content of a cell
TRANSLATE( text, from, to ) -- translate text from one set of characters to another
TIME( text ) -- convert a date string into a serialized date number
TIMEADD( serial, value, unit ) -- add a value to a serialized date
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||
TIMEDIFF( serial_1, serial_2, unit ) -- time difference between two serialized dates
TODAY( ) -- serialized date of today at midnight GMT
TRIM( text ) -- trim spaces from text
UPPER( text ) -- upper case string of a text
VALUE( text ) -- convert text to number
WORKINGDAYS( serial_1, serial_2 ) -- working days between two serialized dates
Bug Tracking Example
| Total: %CALC{"$ROW(-2)"}% \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% | . \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% \ | Total: %CALC{"$SUM( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% |Above table is created manually. Another Plugin could build the table dynamically, e.g. by pulling data out of a bug tracking system. The Spreadsheet Plugin can be used to display table data statistics. Plugin SettingsPlugin settings are stored as preferences variables. To reference a plugin setting write%<plugin>_<setting>% , i.e. %SPREADSHEETPLUGIN_SHORTDESCRIPTION%
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
Plugin Installation InstructionsNote: You do not need to install anything on the browser to use this plugin. Below installation instructions are for the administrator who needs to install this plugin on the TWiki server.
| |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
Plugin Info
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | -- TWiki:Main/PeterThoeny![]() | ||||||||||||||||||||||||||||||
> > | -- TWiki:Main/PeterThoeny![]() | ||||||||||||||||||||||||||||||
TWiki Spreadsheet PluginThis Plugin adds speadsheet capabilities to KoreaCmsWiki? topics. Formulae like%CALC{"$INT(7/3)"}% are evaluated at page view time. They can be placed in table cells and outside of tables. In other words, this Plugin provides general formula evaluation capability, not just classic spreadsheet functions.
Syntax RulesThe action of this Plugin is triggered by the%CALC{"..."}% variable, which gets rendered according to the built-in function(s) found between the quotes.
Built-in FunctionsConventions for Syntax:
ABOVE( ) -- address range of cells above the current cell
ABS( num ) -- absolute value of a number
AND( list ) -- logcial AND of a listAVERAGE( list ) -- average of a list or a range of cells
CHAR( number ) -- ASCII character represented by number
CODE( text ) -- ASCII numeric value of character
COLUMN( offset ) -- current column number
COUNTITEMS( list ) -- count individual items in a list
COUNTSTR( list, str ) -- count the number of cells in a list equal to a given string
DEF( list ) -- find first non-empty list item or cell
EVAL( formula ) -- evaluate a simple formula
EXACT( text1, text2 ) -- compare two text strings
FIND( string, text, start ) -- find one string within another string
FORMAT( type, prec, number ) -- format a number to a certain type and precision
FORMATTIME( serial, text ) -- convert a serialized date into a date string
FORMATGMTIME( serial, text ) -- convert a serialized date into a GMT date string
GET( name ) -- get the value of a previously set variable
IF( condition, value if true, value if 0 ) -- return a value based on a condition
INT( formula ) -- evaluate formula and round down to nearest integer
LEFT( ) -- address range of cells to the left of the current cell
LENGTH( text ) -- length of text in bytes
LIST( range ) -- convert content of a cell range into a list
LISTIF( condition, list ) -- remove elements from a list that do not meet a condition
LISTITEM( index, list ) -- get one element of a list
LISTMAP( formula, list ) -- evaluate and update each element of a list
LISTREVERSE( list ) -- opposite order of a list
LISTSIZE( list ) -- number of elements in a list
LISTSORT( list ) -- sort a list
LISTUNIQUE( list ) -- remove all duplicates from a list
LOWER( text ) -- lower case string of a text
MAX( list ) - biggest value of a list or range of cells
MEDIAN( list ) -- median of a list or range of cells
MIN( list ) -- smallest value of a list or range of cells
MOD( num, divisor ) -- reminder after dividing
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SUMDAYS( list ) -- sum the days in a list or range of cells
SUMPRODUCT( list, list ) -- scalar product on ranges of cells
T( address ) -- content of a cell
TRANSLATE( text, from, to ) -- translate text from one set of characters to another
TIME( text ) -- convert a date string into a serialized date number
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TIMEADD( serial, value, unit ) -- add a value to a serialized date
TIMEDIFF( serial_1, serial_2, unit ) -- time difference between two serialized dates
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TODAY( ) -- serialized date of today at midnight GMT
TRIM( text ) -- trim spaces from text
UPPER( text ) -- upper case string of a text
VALUE( text ) -- convert text to number | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
WORKINGDAYS( serial_1, serial_2 ) -- working days between two serialized dates
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bug Tracking Example
| Total: %CALC{"$ROW(-2)"}% \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% | . \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% \ | Total: %CALC{"$SUM( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% |Above table is created manually. Another Plugin could build the table dynamically, e.g. by pulling data out of a bug tracking system. The Spreadsheet Plugin can be used to display table data statistics. Plugin SettingsPlugin settings are stored as preferences variables. To reference a plugin setting write%<plugin>_<setting>% , i.e. %SPREADSHEETPLUGIN_SHORTDESCRIPTION%
Plugin Installation InstructionsNote: You do not need to install anything on the browser to use this plugin. Below installation instructions are for the administrator who needs to install this plugin on the TWiki server.
Plugin Info
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | -- TWiki:Main/PeterThoeny![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | -- TWiki:Main/PeterThoeny![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | ` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | TWiki Spreadsheet Plugin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | TWiki Spreadsheet Plugin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This Plugin adds speadsheet capabilities to KoreaCmsWiki? topics. Formulae like %CALC{"$INT(7/3)"}% are evaluated at page view time. They can be placed in table cells and outside of tables. In other words, this Plugin provides general formula evaluation capability, not just classic spreadsheet functions.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Formula: %CALC{" "}% Result: guest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Formula: %CALC{" TWikiGuest?)" />"}% Result: TWiki Guest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The formula next to "Total" is %CALC{"$SUM( $ABOVE() )"}% . (you see the formula instead of the sum in case the Plugin is not installed or not enabled.) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Syntax RulesThe action of this Plugin is triggered by the%CALC{"..."}% variable, which gets rendered according to the built-in function(s) found between the quotes.
Built-in Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Conventions for Syntax:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
ABOVE( ) -- address range of cells above the current cell
ABS( num ) -- absolute value of a number
AND( list ) -- logcial AND of a listAVERAGE( list ) -- average of a list or a range of cells
CHAR( number ) -- ASCII character represented by number
CODE( text ) -- ASCII numeric value of character
COLUMN( offset ) -- current column number
COUNTITEMS( list ) -- count individual items in a list
COUNTSTR( list, str ) -- count the number of cells in a list equal to a given string
DEF( list ) -- find first non-empty list item or cell
EVAL( formula ) -- evaluate a simple formula
EXACT( text1, text2 ) -- compare two text strings
FIND( string, text, start ) -- find one string within another string
FORMAT( type, prec, number ) -- format a number to a certain type and precision
FORMATTIME( serial, text ) -- convert a serialized date into a date string
FORMATGMTIME( serial, text ) -- convert a serialized date into a GMT date string
GET( name ) -- get the value of a previously set variable
IF( condition, value if true, value if 0 ) -- return a value based on a condition
INT( formula ) -- evaluate formula and round down to nearest integer
LEFT( ) -- address range of cells to the left of the current cell
LENGTH( text ) -- length of text in bytes
LIST( range ) -- convert content of a cell range into a list
LISTIF( condition, list ) -- remove elements from a list that do not meet a condition
LISTITEM( index, list ) -- get one element of a list
LISTMAP( formula, list ) -- evaluate and update each element of a list
LISTREVERSE( list ) -- opposite order of a list
LISTSIZE( list ) -- number of elements in a list
LISTSORT( list ) -- sort a list
LISTUNIQUE( list ) -- remove all duplicates from a list
LOWER( text ) -- lower case string of a text
MAX( list ) - biggest value of a list or range of cells
MEDIAN( list ) -- median of a list or range of cells
MIN( list ) -- smallest value of a list or range of cells
MOD( num, divisor ) -- reminder after dividing
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bug Tracking Example
| Total: %CALC{"$ROW(-2)"}% \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% | . \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% \ | Total: %CALC{"$SUM( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% |Above table is created manually. Another Plugin could build the table dynamically, e.g. by pulling data out of a bug tracking system. The Spreadsheet Plugin can be used to display table data statistics. Plugin SettingsPlugin settings are stored as preferences variables. To reference a plugin setting write%<plugin>_<setting>% , i.e. %SPREADSHEETPLUGIN_SHORTDESCRIPTION%
Plugin Installation InstructionsNote: You do not need to install anything on the browser to use this plugin. Below installation instructions are for the administrator who needs to install this plugin on the TWiki server.
Plugin Info
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | -- TWiki:Main/PeterThoeny![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | -- TWiki:Main/PeterThoeny![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | ` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TWiki Spreadsheet PluginThis Plugin adds speadsheet capabilities to KoreaCmsWiki? topics. Formulae like%CALC{"$INT(7/3)"}% are evaluated at page view time. They can be placed in table cells and outside of tables. In other words, this Plugin provides general formula evaluation capability, not just classic spreadsheet functions. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The formula next to "Total" is %CALC{"$SUM( $ABOVE() )"}% . (you see the formula instead of the sum in case the Plugin is not installed or not enabled.) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Syntax RulesThe action of this Plugin is triggered by the%CALC{"..."}% variable, which gets rendered according to the built-in function(s) found between the quotes.
Built-in Functions
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bug Tracking Example
| Total: %CALC{"$ROW(-2)"}% \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% | . \ | %CALC{"$COUNTITEMS( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% \ | Total: %CALC{"$SUM( R2:C$COLUMN()..R$ROW(-1):C$COLUMN() )"}% |Above table is created manually. Another Plugin could build the table dynamically, e.g. by pulling data out of a bug tracking system. The Spreadsheet Plugin can be used to display table data statistics. Plugin SettingsPlugin settings are stored as preferences variables. To reference a plugin setting write%<plugin>_<setting>% , i.e. %SPREADSHEETPLUGIN_SHORTDESCRIPTION%
Plugin Installation InstructionsNote: You do not need to install anything on the browser to use this plugin. Below installation instructions are for the administrator who needs to install this plugin on the TWiki server.
Plugin Info
![]() |
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | TWiki Spreadsheet PluginThis Plugin adds speadsheet capabilities to KoreaCmsWiki? topics. Formulae like%CALC{"$INT(7/3)"}% are evaluated at page view time. They can be placed in table cells and outside of tables. In other words, this Plugin provides general formula evaluation capability, not just classic spreadsheet functions.
Example:
%CALC{"$SUM( $ABOVE() )"}% . (you see the formula instead of the sum in case the Plugin is not installed or not enabled.) Syntax RulesThe action of this Plugin is triggered by the%CALC{"..."}% variable, which gets rendered according to the built-in function(s) found between the quotes.
Built-in Functions
|