CALC{"formula"} -- add spreadsheet calculations to tables

The %CALC{formula}% variable is handled by the SpreadSheetPlugin. Over 100 functions are available, such as $ABS(), $EXACT(), $EXISTS(), $GET()/$SET(), $IF(), $LOG(), $LOWER(), $PERCENTILE(), $TIME(), $VALUE().

Syntax: %CALC{formula}%

Examples:

%CALC{$SUM($ABOVE())}% returns the sum of all cells above the current cell

%CALC{$EXISTS(Web.SomeTopic)}% returns 1 if the topic exists

%CALC{$UPPER(Collaboration)}% returns COLLABORATION

Note: The CALC variable is handled with delay compared to other TWiki variables. You may get unexpected results if you nest CALC inside other variables (such as %INCLUDE{%CALC{...}%}%) because it does not get evaluated inside-out & left-to-right like ordinary TWiki variables. Use CALCULATE if you nest variables.

The %CALCULATE{formula}% variable is handled by the SpreadSheetPlugin. Over 100 functions are available, such as $ABS(), $EXACT(), $EXISTS(), $GET()/$SET(), $IF(), $LOG(), $LOWER(), $PERCENTILE(), $TIME(), $VALUE().

Syntax: %CALC{formula}%

Examples:

%CALC{$EXISTS(Web.SomeTopic)}% returns 1 if the topic exists

%CALC{$UPPER(Collaboration)}% returns COLLABORATION

Note: The CALCULATE variable is handled inside-out & left-to-right like ordinary TWiki variables, but it does not support functions that refer to table cells, such as $LEFT() or $T(). Use CALC instead.

Rows can be added and removed if "on" Rows can be added but not removed if "add" Rows cannot be added or removed if "off"

CHANGEROWS plugin setting

quietsave

Quiet Save button is shown if "on", hidden if "off"

QUIETSAVE plugin setting

include

Other topic defining the EDITTABLE parameters. The first %EDITTABLE% in the topic is used. This is useful if you have many topics with the same table format and you want to update the format in one place.

(none)

helptopic

Topic name containing help text shown below the table when editing a table. The %STARTINCLUDE% and %STOPINCLUDE% variables can be used in the topic to specify what is shown.

(no help text)

headerislabel

Table header cells are read-only (labels) if "on"; header cells can be edited if "off" or "0"

"on"

editbutton

Set edit button text, e.g. "Edit this table"; set button image with alt text, e.g. "Edit table, %PUBURL%/%SYSTEMWEB%/TWikiDocGraphics/edittopic.gif"; hide edit button at the end of the table with "hide" (Note: Button is automatically hidden if an edit button is present in a cell)

EDITBUTTON plugin setting

buttonrow

Set to top to put the edit buttons above the table.

bottom

javascriptinterface

Use javascript to directly move and delete row without page refresh. Enable with "on", disable with "off".

JAVASCRIPTINTERFACE plugin setting

redirectto

Set up a return page after saving changes. e.g By setting redirectto="%BASEPAGE%", you can return to base page if your editable table is included by another page.

Data cell alignment, one value for all columns, or a comma separated list for different alignment of individual columns. Set to "left", "center", "right" or "justify". Overrides individual cell settings.

unspecified

dataalign="center"

databgsorted

Data cell background color of a sorted column; see databg.

the values of databg

databgsorted="#d4e8e4,#e5f5ea"

databg

Data cell background color, a comma separated list. Specify "none" for no color, that is to use the color/background of the page the table is on.

"#edf4f9,#ffffff"

databg="#f2f2f2,#ffffff"

datacolor

Data cell text color, a comma separated list.

unspecified

datacolor="#0000CC, #000000"

disableallsort

Disable all sorting, both initsort and header sort. This is mainly used by plugins such as the EditTablePlugin to disable sorting in a table while editing the table.

unspecified

disableallsort="on"

headeralign

Header cell alignment, one value for all columns, or a comma separated list for different alignment of individual columns. Set to "left", "center", "right" or "justify". Overrides individual cell settings.

unspecified

headeralign="left,right"

headerbgsorted

Header cell background color of a sorted column.

the value of headerbg

headerbgsorted="#32596c"

headerbg

Header cell background color.

"#6b7f93"

headerbg="#999999"

headercolor

Header cell text color.

"#ffffff"

headercolor="#0000cc"

initdirection

Initial sorting direction for initsort, set to "up" (descending) or "down" (ascending).

unspecified

initdirection="up"

footerrows

Number of footer rows to exclude from sort. (will be rendered in a HTML tfoot section)

"0"

footerrows="1"

headerrows

Number of header rows to exclude from sort. (will be rendered in a HTML thead section)

(determined automatically)

headerrows="2"

sort

Set table sorting by clicking headers "on" or "off".

unspecified

sort="on"

tableborder

Table border width (pixels).

"1"

tableborder="2"

caption

Table caption: A title that will be displayed just above the table.

unspecified

caption="Users"

tableframe

Table frame, set to "void" (no sides), "above" (the top side only), "below" (the bottom side only), "hsides" (the top and bottom sides only), "lhs" (the left-hand side only), "rhs" (the right-hand side only), "vsides" (the right and left sides only), "box" (all four sides), "border" (all four sides).

unspecified

tableframe="hsides"

tablerules

Table rules, set to "none" (no rules), "groups" (rules will appear between row groups and column groups only), "rows" (rules will appear between rows only), "cols" (rules will appear between columns only), "all" (rules will appear between all rows and columns).

unspecified

tablerules="rows"

summary

Table summary used by screenreaders: A summary of what the table presents. It should provide an orientation for someone who listens to the table.

unspecified

summary="List of subscribed users"

tablewidth

Table width: Percentage of window width, or absolute pixel value.

unspecified

tablewidth="100%"

id

Unique table identifier string, used for targeting a table with CSS.

tableN (where N is the table order number on the page)

id="userTable"

valign

Vertical alignment of cells and headers, set to "top", "middle", "bottom" or "baseline".