This question about Using an extension: Answered

LISTEACH function doesnt work if all elements are empty


Problem description

i tried to create a table and used the LISTEACH function to modify the cell content. In my first test all cells are empty and i was not able to handle that because the LISTEACH will only loop to the last element which is not empty. If all cells are empty the LISTEACH will not run! Thats not what i expected. Is it maybe a bug?


Description Data Cell comment
... x  
Output all cells above with index and content 1:, 2:x Expected: 1:, 2:x, 3:, 4:
count a static list (5 empty elements) 0 Expected: 5
count a static list (5 elements; 3rd with content) 3 Expected: 5

-- MartinHoffmannMPIb - 11 Jun 2018

This works:

Description Data Cell comment
... x  
Output all cells above with index and content 1:, 2:x, 3:, 4: Expected: 1:, 2:x, 3:, 4:
-- Main.MichaelDaum - 11 Jun 2018

YES, thanks! it work when i not use the $LIST function to get a list of the above cells. Thats because i didnt know that the R..:C.. will return a list.

$LIST(R2:C$COLUMN()..R$ROW(-1):C$COLUMN()) -> not working and wrong
R2:C$COLUMN()..R$ROW(-1):C$COLUMN() -> working

But bevore you wrote that reply i did a lookup in the perl code and found that _getList will not use a negative limit parameter for split in the foreach loop.
The perl documentation says that "trailing empty fields are stripped" if there is no negativ limit.
But iam not a perl expert. Your solution is now working and thats fine for me,

Thanks Michael

-- MartinHoffmannMPIb - 11 Jun 2018


-- MichaelDaum - 12 Jun 2018

QuestionForm edit

Subject Using an extension
Extension SpreadSheetPlugin
Version Foswiki 2.1.6
Status Answered
Related Topics
Topic revision: r4 - 12 Jun 2018, MichaelDaum - This page was cached on 14 Nov 2018 - 16:02.

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