
TSV String; Sum of Number Column
Calculates the sum of values in numeric column. If non-numeric data is mixed in the specified column, the record is regarded as zero and not added.
2019-08-05 (C) Questetra, Inc. (MIT License)
https://support.questetra.com/addons/tsv-string-sum-of-number-column/
Download
- Tsv-String-Sum-of-Number-Column-201908.xml
- Tsv-String-Sum-of-Number-Column-201909.xml (Deletes only newline characters at both ends of a string.)
- //const inputText = (engine.findDataByNumber( dataIdA ) + “”).trim();
- const inputText = (engine.findDataByNumber( dataIdA ) + “”).replace(/^[\n]*/, “”).replace(/[\n]*$/, “”);
- Tsv-String-Sum-of-Number-Column-201911.xml (Comma removal version: for regions that use a comma as a thousands separator)
- strValueB = strValueB.replace( /,/g, “” ); // 2019-11
Capture

Notes
- Since numeric parsing depends on JavaScript parseFloat(), numerical values are not recognized if there is a “prefix”.
- The calculation results will differ if the numeric data contains a thousands separator.