NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

Item1998: Spreadsheet Plugin $RIGHT() is broken

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent Closed Extension SpreadSheetPlugin  
SpreadSheetPlugin $RIGHT() function is supposed to return the range of cells to the right of the current cell. Unfortunately, it returns cells to the left as well.

Test of RIGHT:

Col 3 below contains the expression: %CALC{"$SUM($RIGHT())"}%

Col 1 Col 2 Col 3 Col 4 Col 5
1 2 12 4 8
16 32 192 64 128

The correct answers are 12 and 192. Apparently, RIGHT includes one column to the left as well.

Test of LEFT:

Col 3 below contains the expression: %CALC{"$SUM($LEFT())"}%

Col 1 Col 2 Col 3 Col 4 Col 5
1 2 3 4 8
16 32 48 64 128

The correct answers above, are 3 and 48.

This works correctly.

Suggestion

Enhance $RIGHT() and $LEFT() to accept a value which is the number of cells to the right or left to include. For example $LEFT(2) would include the two cells to the left and no more.


PATCH

Attached trivial patch fixes this out by 2 error...

  • Calc.diff: Patch to fix this trivial but very annoying bug

Note - made this urgent because it seems a pretty good idea to include such a trivial fix for such a complete breakage of functionality in the release.

-- DarrylGreen - 08 Aug 2010

Good move. Fix merged to trunk, thanks Darryl!

-- CrawfordCurrie - 09 Aug 2010

ItemTemplate edit

Summary Spreadsheet Plugin $RIGHT() is broken
ReportedBy RaymondLutz
Codebase 1.0.6
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component SpreadSheetPlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins Foswikirev:8445
TargetRelease minor
ReleasedIn 1.1.0
Topic attachments
I Attachment Action Size Date Who Comment
Calc.diffdiff Calc.diff manage 0.3 K 08 Aug 2010 - 07:28 DarrylGreen Patch to fix this trivial but very annoying bug
Topic revision: r5 - 04 Oct 2010, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads