Difference: SpreadSheetPlugin (29 vs. 30)

Revision 302014-11-03 - TWikiAdminUser

Line: 1 to 1
 
    Page contents    
Line: 46 to 46
 
Added:
>
>
 
%CALCULATE{
Changed:
<
<
TWikiGuest)" class="twikiInputField" />}%
>
>
TWikiGuest)" class="twikiInputField" style="width:97%" />}%
 
Changed:
<
<
>
>
 
Result: 
Changed:
<
<
TWiki Guest
>
>
TWiki Guest
 
Added:
>
>
 
Line: 151 to 153
 
  • Syntax: $BITXOR( text )
  • Example: %CALCULATE{$BITXOR(A123)}% returns ¾ÎÍÌ
  • Example: %CALCULATE{$BITXOR($BITXOR(anything))}% returns anything
Changed:
<
<
>
>
 

CEILING( num ) -- return the smallest integer following a number

Line: 482 to 484
 
  • Syntax: $INSERTSTRING( text, start, new )
  • Example: %CALCULATE{$INSERTSTRING(abcdefg, 2, XYZ)}% returns abXYZcdefg
  • Example: %CALCULATE{$INSERTSTRING(abcdefg, -2, XYZ)}% returns abcdeXYZfg
Changed:
<
<
>
>
 

INT( formula ) -- evaluate formula and return integer truncated towards 0

Line: 540 to 542
 
  • Syntax: $LEFTSTRING( text, num )
  • Example: %CALCULATE{$LEFTSTRING(abcdefg)}% returns a
  • Example: %CALCULATE{$LEFTSTRING(abcdefg, 5)}% returns abcde
Changed:
<
<
>
>
 

LENGTH( text ) -- length of text in bytes

Line: 605 to 607
 

LISTRAND( list ) -- get one random element of a list

  • Syntax: $LISTRAND( list )
  • Example: %CALCULATE{$LISTRAND(Apple, Orange, Apple, Kiwi)}% returns one of the four elements
Changed:
<
<
>
>
 

LISTREVERSE( list ) -- opposite order of a list

Line: 617 to 619
 

LISTSHUFFLE( list ) -- shuffle element of a list in random order

  • Syntax: $LISTSHUFFLE( list )
  • Example: %CALCULATE{$LISTSHUFFLE(Apple, Orange, Apple, Kiwi)}% returns the four elements in random order
Changed:
<
<
>
>
 

LISTSIZE( list ) -- number of elements in a list

Line: 764 to 766
 

RAND( max ) -- random number

  • Random number, evenly distributed between 0 and max, or 0 and 1 if max is not specified
  • Syntax: $RAND( max )
Changed:
<
<
>
>

RANDSTRING( set, format ) -- random string & password generator

  • Generate a random string from a set of characters; the set may contain sequences like a..z; default is a..zA..Z0..9_. The format defines the string length or the output format; specify a number to indicate the length of the random string; default is 8 characters. Alternatively, specify a format string with x as placeholders for random characters, such xxxx-xxxx-xxxx-xxxx.
  • Syntax: $RANDSTRING( set, format )
  • Example: %CALCULATE{$RANDSTRING()}% returns a random string with 8 characters composed of alphanumeric characters and underscores
  • Example: %CALCULATE{$RANDSTRING(A..NP..Z1..9, xxxx-xxxx-xxxx-xxxx)}% returns four sets of random strings, separated by dashes, where each set has four characters composed of uppercase letters and numbers, excluding letter O and number 0
  • Related: $INSERTSTRING(), $SUBSTRING(), $LISTRAND(), $LISTSHUFFLE(), $RAND(), $REPEAT()
 

REPEAT( text, num ) -- repeat text a number of times

  • Syntax: $REPEAT( text, num )
  • Example: %CALCULATE{$REPEAT(/\, 5)}% returns /\/\/\/\/\
Changed:
<
<
>
>
 

REPLACE( text, start, num, new ) -- replace part of a text string

Line: 791 to 801
 
  • Syntax: $RIGHTSTRING( text, num )
  • Example: %CALCULATE{$RIGHTSTRING(abcdefg)}% returns g
  • Example: %CALCULATE{$RIGHTSTRING(abcdefg, 5)}% returns cdefg
Changed:
<
<
>
>
 

ROUND( formula, digits ) -- round a number

Line: 912 to 922
 
  • Example: %CALCULATE{$SUBSTITUTE(Q2-2012, 2, 3)}% returns Q3-3013
  • Example: %CALCULATE{$SUBSTITUTE(Q2-2012,2, 3, 3)}% returns Q2-2013
  • Example: %CALCULATE{$SUBSTITUTE(abc123def, [0-9], 9, , r)}% returns abc999def
Changed:
<
<
>
>
 

SUBSTRING( text, start, num ) -- extract a substring out of a text string

  • Extract num number of characters of text string text, starting at start. Starting position is 1; use a negative start to count from the end of the text. All parameters are required - the text may contain commas.
  • Syntax: $SUBSTRING( text, start, num )
  • Example: %CALCULATE{$SUBSTRING(abcdefghijk, 3, 5)}% returns cdefg
Changed:
<
<
>
>
 

SUM( list ) -- sum of a list or range of cells

Line: 1230 to 1240
 
Copyright: © 2001-2014 Peter Thoeny, TWiki.org
© 2008-2014 TWiki:TWiki.TWikiContributor
© 2014 Wave Systems Corp.
Sponsor: Wave Systems Corp. for hash functions
License: GPL (GNU General Public License)
Changed:
<
<
Plugin Version: 2014-09-23
>
>
Plugin Version: 2014-10-23
 
<--/twistyPlugin twikiMakeVisibleInline-->
Added:
>
>
2014-10-23: TWikibug:Item7583: Add RANDSTRING(); better layout in interactive example
 
2014-09-23: TWikibug:Item7553: Allow newlines and indent around functions and function parameters
2014-09-22: TWikibug:Item7552: Allow newlines in triple-quoted strings
2014-03-04: TWikibug:Item7445: Add FORMAT(CURRENY, ...) with support for currency symbol
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding PlanetoWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.SpreadSheetPlugin.