| TWiki Spreadsheet Plugin
This Plugin adds spreadsheet capabilities to TWiki 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. |
|
LISTMAP( formula, list ) -- evaluate and update each element of a list |
|
< < |
- In the formula you can use
$item to indicate the element; $index to show the index of the list, starting at 1
|
> > |
- In the formula you can use
$item to indicate the element; $index to show the index of the list, starting at 1. If $item is omitted, the item is appended to the formula.
|
|
- Syntax:
$LISTMAP( formula, list )
- Example:
%CALC{"$LISTMAP($index: $EVAL(2 * $item), 3, 5, 7, 11)"}% returns 1: 6, 2: 10, 3: 14, 4: 22
- Related:
$COUNTITEMS() , $COUNTSTR() , $LIST() , $LISTIF() , $LISTITEM() , $LISTREVERSE() , $LISTSIZE() , $LISTSORT() , $LISTUNIQUE() , $SUM()
|
|
LISTRAND( list ) -- get one random element of a list
- Syntax:
$LISTRAND( list )
|
|
< < |
- Example:
%CALC{"$LISTRRAND(Apple, Orange, Apple, Kiwi)"}% returns one of the four elements
|
> > |
- Example:
%CALC{"$LISTRAND(Apple, Orange, Apple, Kiwi)"}% returns one of the four elements
|
|
- Related:
$COUNTITEMS() , $COUNTSTR() , $LIST() , $LISTIF() , $LISTITEM() , $LISTMAP() , $LISTSHUFFLE() , $LISTSIZE() , $LISTSORT() , $LISTUNIQUE() , $RAND() , $SUM()
|
| Plugin Info
|
|
< < |
|
> > |
|
|
|
|
< < |
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 |
|
| Related Topics: TWikiPreferences, TWikiPlugins |
|
< < | -- TWiki:Main/PeterThoeny - 18 Dec 2006 |
> > | -- TWiki:Main/PeterThoeny - 23 Jan 2007 |
| |