cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
This question about Using an extension: Answered

Seeking Help on SUBSTITUTE function in Spreadsheet Plugin

The SUBSTITUTE command is as folows
%CALC{" $SUBSTITUTE(theString, old_char,new_char) "}%

My old_char is a delimiter such as | (it can be any character) and I want to change it to a comma. For example,

"C&A|CABO|Documentation|Capabilities" is the string and I wish to change the | to commas as such:

C&A,CABO,Documentation,Capabilities

-- JoeMarandola - 14 Feb 2012


Instead of SUBSTITUTE, Try TRANSLATE
%CALC{$TRANSLATE("C&A|CABO|Documentation|Capabilities",|,$comma)}%
returns
"C&A,CABO,Documentation,Capabilities"

-- GeorgeClark - 15 Feb 2012

Note - Added $comma and $sp to the plugin for the next release - Item11523

-- GeorgeClark - 15 Feb 2012

Thank you George. I tried using $comma in the substitute and when that didn't work tried all types of other methods. TRANSLATE works just fine.

-- JoeMarandola - 16 Feb 2012
 

QuestionForm edit

Subject Using an extension
Extension SpreadSheetPlugin
Version Foswiki 1.1.3
Status Answered
Related Topics
Topic revision: r4 - 16 Feb 2012, JoeMarandola - This page was cached on 23 Mar 2018 - 03:52.

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