I would like to set a rule for having all the time a specific format already in knime and not only in an excel as output, This would be in order to have a clear report.
The specific problem is:
I have a number which is 12,758,242.85 and if i convert into a string will be 1.2758242850000001E7.
My final output would be like:
12’758
Thank you very much. Same would be appreciated in the case of percentage:
0.51 --> 51%
Hi. Am I correct to assume you would like to format numbers such that the ‘thousands separator’ should be an apostrophe instead of a comma? For example how they format numbers in Switzerland?
Here’s a quick and dirty solution using Java. (I created a metanode you can copy into your own workflow and configure). Import the attached .knwf file into your KNIME desktop explorer.
The metanode can be configured with the column of (double) numbers you want to format, and the formatting pattern string (see http://tutorials.jenkov.com/java-internationalization/decimalformat.html#number-format-pattern-syntax for pattern syntax). Although the thousands separator is specified with a comma in the pattern, it will be replaced with apostrophe in the output.
Example output: