You are here: Foswiki>Tasks Web>Item1997 (08 Aug 2010, DarrylGreen)Edit Attach

Item1997: Spreadsheet Plugin $RIGHT() and $LEFT() are broken

pencil
Priority: Urgent
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Extension
Component: SpreadSheetPlugin
Branches:
Reported By: RaymondLutz
Waiting For:
Last Change By: DarrylGreen
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.

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.

Clearly, this is an important bug to fix as people assume the spreadsheet plugin will be bug free.

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

See Item1998

NOTE: I've marked this no action required because despite the title, this item shows (as per test case for LEFT above) that LEFT is not broken. Only RIGHT is, so this is a duplicate of Item1998.

-- DarrylGreen - 08 Aug 2010

ItemTemplate edit

Summary Spreadsheet Plugin $RIGHT() and $LEFT() are 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 No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r2 - 08 Aug 2010, DarrylGreen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy