<<O>>  Difference Topic SpreadSheetPlugin (r1.10 - 17 Jul 2004 - PeterThoeny)

TWiki Spreadsheet Plugin

This Plugin adds speadsheet capabilities to UAIWiki 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.

Line: 411 to 411

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

  • Syntax: $SUM( list )
  • Example: To sum up column 5 excluding the title row, write %CALC{"$SUM(R2:C5..R$ROW(-1):C5)"}% in the last row; or simply %CALC{"$SUM($ABOVE())"}%
Changed:
<
<
>
>

SUMDAYS( list ) -- sum the days in a list or range of cells

Line: 445 to 445

  • Serialized date is seconds since the Epoch, e.g. midnight, 01 Jan 1970. Current time is taken if the date string is empty. Supported date formats: 31 Dec 2009; 31 Dec 2009 GMT; 31 Dec 09; 31-Dec-2009; 31/Dec/2009; 2009/12/31; 2009-12-31; 2009/12/31; 2009/12/31 23:59; 2009/12/31 - 23:59; 2009-12-31-23-59; 2009/12/31 - 23:59:59; 2009.12.31.23.59.59. Date is assumed to be server time; add GMT to indicate Greenwich time zone
  • Syntax: $TIME( text )
  • Example: %CALC{"$TIME(2003/10/14 GMT)"}% returns 1066089600
Changed:
<
<
>
>

TIMEADD( serial, value, unit ) -- add a value to a serialized date

Line: 460 to 460

  • The unit is seconds if not specified; unit can be specified as in $TIMEADD(). Note: An approximation is used for month and year calculations. Use $FORMAT() or $INT() to format real numbers
  • Syntax: $TIMEDIFF( serial_1, serial_2, unit )
  • Example: %CALC{"$TIMEDIFF($TIME(), $EVAL($TIME()+90), minute)"}% returns 1.5
Changed:
<
<
>
>

TODAY( ) -- serialized date of today at midnight GMT

Line: 491 to 491

  • Example: %CALC{"$VALUE(Total: -12.5)"}% returns -12.5
  • Related: $EVAL(), $INT()
Added:
>
>

WORKINGDAYS( serial_1, serial_2 ) -- working days between two serialized dates

  • Working days are Monday through Friday (sorry, Israel!)
  • Syntax: $WORKINGDAYS( serial_1, serial_2 )
  • Example: %CALC{"$WORKINGDAYS($TIME(2004/07/15), $TIME(2004/08/03))"}% returns 13
  • Related: $SUMDAYS(), $TIME(), $TIMEDIFF()

Bug Tracking Example

Bug#: Priority: Subject: Status: Days to fix
Line: 549 to 556

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Changed:
<
<
Plugin Version: 24 May 2004
>
>
Plugin Version: 17 Jul 2004

Change History: <!-- specify latest version first --> 
Added:
>
>
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
Line: 584 to 592

Related Topics: TWikiPreferences, TWikiPlugins

Changed:
<
<
-- TWiki:Main/PeterThoeny - 24 May 2004 `
>
>
-- TWiki:Main/PeterThoeny - 17 Jul 2004

View topic | Diffs | r1.10 | > | r1.9 | > | r1.8 | More
Revision r1.9 - 25 May 2004 - 06:34 - PeterThoeny
Revision r1.10 - 17 Jul 2004 - 08:49 - PeterThoeny