TWiki
>
TWiki Web
>
TWikiVariables
>
VarCALC
(revision 5) (raw view)
Edit
Attach
#VarCALC ---+++ CALC{"formula"} -- add spreadsheet calculations to tables * The =%<nop>CALC{formula}%= variable is handled by the SpreadSheetPlugin. Around 100 functions are available, such as =$ABS()=, =$EXACT()=, =$EXISTS()=, =$GET()/$SET()=, =$IF()=, =$LOG()=, =$LOWER()=, =$PERCENTILE()=, =$TIME()=, =$VALUE()=. * Syntax: =%<nop>CALC{formula}%= * Examples: * =%<nop>CALC{$SUM($ABOVE())}%= returns the sum of all cells above the current cell * =%<nop>CALC{$EXISTS(<nop>Web.SomeTopic)}%= returns =1= if the topic exists * =%<nop>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 =%<nop>INCLUDE{%<nop>CALC{...}%}%=) because it does not get evaluated inside-out & left-to-right like ordinary TWiki variables. Use [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarCALCULATE][CALCULATE]] if you nest variables. * Category: DevelopmentVariables, TablesAndSpreadsheetsVariables * Related: [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarCALCULATE][CALCULATE]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarIF][IF]], %SYSTEMWEB%.IfStatements, SpreadSheetPlugin
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r6
<
r5
<
r4
<
r3
<
r2
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r5 - 2012-11-12
-
TWikiContributor
TWiki
Log In
or
Register
TWiki Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
LAPPD
Sandbox
TWiki
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.VarCALC
.