create new tag
, view all tags
How about a spreadsheet like calculation feature for TWiki | tables | ? This would be a nice TWikiPlugin. Here is the idea:

  • New variable %CALC{"formula"}%. It can be in any table cell, but also in text outside of a table.

  • The "formula" can be:
    • a simple calculation, i.e. %CALC{"2 + 2"}%
    • and may contain built in functions that do some math

  • A table cell can be addressed as "R1:C1". I.e. "row 2, column 3" is "R2:C3"

  • A table cell range (aka list) is defined by two cell addresses separated by "...". I.e. "row 1 through 20, column 3" is: "R1:C3...R1:C3"

  • Built in functions, i.e.
    • "$ROW(offset)" and "$COLUMN(offset)" returns the current row and column number, with an optional offset. I.e. to list the number of rows excluding title ( first row) and summary (last row) write: %CALC{"$ROW(-2)"}%

    • "$SUM(list)" returns the sum of a list or range. I.e. to sum up column 5 excluding the title row, write: %CALC{"$SUM( R2:C5...R$ROW(-1):C5 )"}%

    • "$COUNTITEMS(list)" returns the counts of individual items in a list. I.e. write: %CALC{"$COUNTITEMS( R2:C2...R$ROW(-1):C2 )"}%

Anybody up to writing a plugin that does something like this?

-- PeterThoeny - 08 Mar 2001

Peter. Funny you should mention that. I've been playng with this a bit at home recently. However, I was planning to copy the approach you used for TWikiDraw.

1. I've got a couple of simple Java spreadsheet applets of the Internet 2. I'll take best features of thse 3. Alter so html and csv or similar uploaded to TWiki 4. Edits to be done using applet

However, not doing much, as focus is on items for TWikiReleaseSpring2001.

-- JohnTalintyre - 08 Mar 2001

We had a need at work for that, so I created a first version. I will upload the ZIP in a few days. Please follow up in the Plugins web, SpreadSheetPlugin and SpreadSheetPluginDev.

-- PeterThoeny - 14 Mar 2001

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2001-09-18 - MikeMannix
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.