This question about Using an extension: Asked

Spreadsheet plugin LISTEACH and nested function formulas

-- BramVanOosterhout - 25 Jan 2016 The code:
 %CALCULATE{ "$LISTEACH(
               $item: $DEC2HEX($COUNTSTR( au.fujitsu.com, au.fujitsu.com, gmail.com, au.fujitsu.com, eaglet.rain.com, au.fujitsu.com, $item  ),6),
               au.fujitsu.com, gmail.com,  eaglet.rain.com )" 
}%

Produces: 6): $DEC2HEX(0, au.fujitsu.com: $DEC2HEX(4, gmail.com: $DEC2HEX(1, eaglet.rain.com: $DEC2HEX(1

The above demonstrates that a straightforward implementation of listeach with a nest function formula appears to parse the bracketing incorrectly. The second parameter of DEC2HEX (...,6) [the ,6)] is taken as the first entry in the list defining EACH in the listeach.

The sequence below shows that the functionilty works in non-nested funtions.

Is there a way to escape the nesting so that the parsing will behave correctly?

Count the items in a string

au.fujitsu.com: 4

gmail.com: 1

Translate to hex

au.fujitsu.com: 000004

Show each item

au.fujitsu.com, gmail.com, eaglet.rain.com

Count each item

au.fujitsu.com:4, gmail.com:1, eaglet.rain.com:1

Count each item in hex

6): $DEC2HEX(0, au.fujitsu.com: $DEC2HEX(4, gmail.com: $DEC2HEX(1, eaglet.rain.com: $DEC2HEX(1

 

QuestionForm edit

Subject Using an extension
Extension SpreadSheetPlugin
Version Foswiki 2.0.3
Status Asked
Related Topics
Topic revision: r1 - 25 Jan 2016, BramVanOosterhout - This page was cached on 10 Jan 2018 - 19:11.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License