{"id":174585,"date":"2025-07-03T16:19:45","date_gmt":"2025-07-03T07:19:45","guid":{"rendered":"https:\/\/support.questetra.com\/?p=174585"},"modified":"2025-07-08T16:48:59","modified_gmt":"2025-07-08T07:48:59","slug":"tsv-string-basic-math-on-numeric-column-2025","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/addons\/tsv-string-basic-math-on-numeric-column-2025\/","title":{"rendered":"#TSV-String: Basic Math on Numeric Strings"},"content":{"rendered":"\n<h4 class=\"wp-block-heading has-background\" style=\"background-color:#ffccff;margin-top:var(--wp--preset--spacing--30);margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:var(--wp--preset--spacing--20);padding-bottom:0;padding-left:var(--wp--preset--spacing--20)\"><strong>#TSV-String: Basic Math on Numeric Column<\/strong><\/h4>\n\n\n\n<p class=\"has-text-align-right has-background has-small-font-size mt-0 pt-0 wp-block-paragraph\" style=\"background-color:#ffccff;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:var(--wp--preset--spacing--30);padding-bottom:0;padding-left:var(--wp--preset--spacing--30)\"><a href=\"https:\/\/support.questetra.com\/en\/addons\/tsv-string-basic-math-on-numeric-column-2025\/\"><span class=\"material-icons\">translate<\/span> #TSV\u6587\u5b57\u5217: \u6570\u5024\u5217\u306e\u56db\u5247\u6f14\u7b97<\/a><\/p>\n\n\n\n<p class=\"has-background mt-0 pt-0 wp-block-paragraph\" style=\"background-color:#fff0ff;margin-top:0;margin-right:0;margin-bottom:var(--wp--preset--spacing--60);margin-left:0;padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--40)\">Adds result of a numerical calculation as a new column. The result of binary calculations such as adding column A and column B, or multiplying column C by 1.1, is added to the end of each TSV row. Subtraction, division, remainders, and powers are also supported.<\/p>\n\n\n\n<figure class=\"wp-block-image alignright has-custom-border is-style-default\" style=\"margin-top:0px;margin-bottom:0px\"><img decoding=\"async\" src=\"data:image;base64,\niVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADV0lEQVRYR8WXTUgUYRjHf5O2aSBu\nEiFWVBQRWPlBQfTBih8HO5UnQSjFw3gQK0FBUDNBQg9mltiC1HbQk2BaHQrygzqV4opdooMFKmER\nKyIr1jbxzjg6+zHujJq9sOzCPvP8\/8\/z\/p+PkfjPR7KF7+YK4EIhHQknkL7yvBcFHxLie5gy+q36\njU7gCU6WuQHcBBXUyvEBbTi4Twnit+lZn0Anxezgng3gUCABXoLMMzMG5gQe0YakRr4Vpw2ZW5Ec\nRSbgxgNc3wrkVR8KHsooCfUZTsBm5Ak7E2g\/387bb295\/Onx+pwV7lOmamn1BBPQ7vyJ1cgFeG9e\nL3kH8phZnKH8XTn9X6MWwFWjJtYIaGqfsio4I7iE5mbOP4c\/4GdoZoiSkbBs63H5cHBEr441Am4a\ngNtWoxd2Dy88pPREKXExcUGPBZQA3Z+7uT5sKqM7yCreCnXxy63Wa6IdAsLWk+Wh6FgRsTtigx71\n\/\/ZT+6GW1snWSC59yOxZI6B1uD674MI+\/2A+Xa4uUnanGASv8GbmDQWvC1j4tWDmVtWCdgU2lW\/0\nWJ1WTU1GDU5HcJMc\/T5K9otscwIrFaERcDOs9nibp+lsEzn7cxj4OkBVWlUQieU\/yzR7m6kfrTfz\nOoJMlk7gC3DIDr4ArzxdqQpw8uckfVN9pCalcjzxOKeSTqmuxn+M43ruMsuCF5kMnYCyUXC9\/Gre\n16iNqPBoIR0XO0jalcRSYInGsUbueu9Gdi8j2SZgjDwUXEcx2ggx5r7MjUrA0hVYAdeRXl1+pXbI\n2cVZrg1dY3B2MJiEwgRlpFsWoR1wgXRu3zl6cnpIjk+mYayBlomW0CwYRBilDO2C60iNZxqpOFnB\ng48PqButC82AOpj0DJg2oo2CCzQxLxIdiUwvTkfSgKERab0grBVvBjxKVc0ja+ud6TD6h+ACN8Iw\n0saxqAZ1II0VjJG5N1MNRIxZvc7t9AsT23kcHA4fx8LasJCIIdN5qZP4mPitBBcoJguJTncTg8lC\ndlZTr9tu31IKT5EpDiW5XWt5WOTrZ0D\/V1tUxIpue1NacTEPFG\/sxUQnoVWHWKXFxyoRASxezdo2\n92oWemEiIwpZSKSj4EQiTTURg0XCh4IXieH1IrauAQuS3gqTvxXhUDBgMFNwAAAAAElFTkSuQmCC\n\" alt=\"Auto Step icon\" class=\"has-border-color has-ast-global-color-6-border-color\" style=\"border-width:0.5em\"\/><\/figure>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details open><summary class=\"wp-block-coblocks-accordion-item__title\">Configs for this Auto Step<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<dl style=\"margin: 0 0 -0.7em 0\">\n<div style=\"margin:4px 0px 1em; border:1px dotted #aaa; padding:4px 0 0 4px\" title=\"Standard\"><dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">StrConfA<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">A: Set Input TSV String<span style=\"color:#990000;\"> *<\/span><span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">BoolConfAx<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Ax: Regard First-line as Header: No or Yes<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">OptionConfB<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">B: Select OPERATOR<span style=\"color:#990000;\"> *<\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">StrConfX<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">X: Set ID of First Operand Column (Col-A: &#8220;0&#8221;, Col-C: &#8220;2&#8221;)<span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">StrConfXv<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Xv: Set Default Value of First Operand X (eg: &#8220;1.1&#8221;)<span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">StrConfY<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Y: Set ID of Second Operand Column (Col-B: &#8220;1&#8221;, Col-D: &#8220;3&#8221;)<span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">StrConfYv<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Yv: Set Default Value of Second Operand Y (eg: &#8220;1.1&#8221;)<span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfC<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C: Select STRING DATA to store Output TSV (update)<span style=\"color:#990000;\"> *<\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">BoolConfCx<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Cx: Thousands separator: Off or On<\/dd>\n<\/div>\n<div style=\"margin:4px 0px 1em; border:1px dotted #aaa; padding:4px 0 0 4px\" title=\"Expert\"><dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfDy<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Dy: Select NUMERIC for Number of Input TSV Lines (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfDx<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Dx: Select NUMERIC for Number of Input TSV Cols (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfEy<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Ey: Select NUMERIC for Number of Output TSV Lines (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">SelectConfEx<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Ex: Select NUMERIC for Number of Output TSV Lines (update)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">StrConfF<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">F: If Separator On, Set Minimum Fraction Digits (defalut: &#8220;0&#8221;)<span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">StrConfG<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">G: If Separator On, Set Maximum Fraction Digits (defalut: &#8220;3&#8221;)<span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<\/div>\n\n<\/dl>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details><summary class=\"wp-block-coblocks-accordion-item__title\">Script (click to open)<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>\/\/ Script Example of Business Process Automation\n\/\/ for &#39;engine type: 3&#39; (&quot;GraalJS standard mode&quot;)\n\/\/ cf. &#39;engine type: 2&#39; (&quot;GraalJS Nashorn compatible mode&quot;) (renamed from &quot;GraalJS&quot; at 20230526)\n\n\n\/\/\/\/\/\/\/\/ START &quot;main()&quot; \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nmain();\nfunction main(){ \n\n\/\/\/\/ == Config Retrieving \/ \u5de5\u7a0b\u30b3\u30f3\u30d5\u30a3\u30b0\u306e\u53c2\u7167 ==\nconst strTsv        = configs.get        ( &quot;StrConfA&quot; );       \/\/ REQUIRED\n  if( strTsv === &quot;&quot; ){\n    throw new Error( &quot;\\n AutomatedTask ConfigError:&quot; +\n                     &quot; Config {A: TSV} is empty \\n&quot; );\n  }\n  \/\/ get TSV as Array-Array (2d Array)\n  const arr2dTsv    = parseAsRectangular ( strTsv );  \/\/ [rowY,colX]\n  let numInputTsvLines = arr2dTsv.length;\n  let numInputTsvCols  = arr2dTsv[0].length;\n\nconst boolHeaderOn  = configs.getObject  ( &quot;BoolConfAx&quot; );     \/\/ TOGGLE\n  \/\/ https:\/\/questetra.zendesk.com\/hc\/en-us\/articles\/360024574471-R2300 &quot;Boolean object&quot;\n\nconst strOperator   = configs.get        ( &quot;OptionConfB&quot; );    \/\/\/ REQUIRED (SELECT_ITEM)\n  \/\/ &quot;add&quot;, &quot;subtract&quot;, &quot;multiply&quot;, &quot;divide&quot;, &quot;remainder&quot;, &quot;power&quot;\n\nconst strOperandXid = configs.get        ( &quot;StrConfX&quot; );       \/\/ not required\n  let numOperandXid = parseInt( strOperandXid, 10 );   \/\/ Int or NaN\nconst strOperandXv  = configs.get        ( &quot;StrConfXv&quot; );      \/\/ not required\n  let numOperandXv  = parseFloat( strOperandXv );      \/\/ Float or NaN\nconst strOperandYid = configs.get        ( &quot;StrConfY&quot; );       \/\/ not required\n  let numOperandYid = parseInt( strOperandYid, 10 );   \/\/ Int or NaN\nconst strOperandYv  = configs.get        ( &quot;StrConfYv&quot; );      \/\/ not required\n  let numOperandYv  = parseFloat( strOperandYv );      \/\/ Float or NaN\n\nconst strPocketC     = configs.getObject ( &quot;SelectConfC&quot; );    \/\/ REQUIRED\nconst boolSeparatorOn = configs.getObject ( &quot;BoolConfCx&quot; );    \/\/ TOGGLE\n\nconst numPocketDy    = configs.getObject ( &quot;SelectConfDy&quot; );   \/\/ not required\nconst numPocketDx    = configs.getObject ( &quot;SelectConfDx&quot; );   \/\/ not required\nconst numPocketEy    = configs.getObject ( &quot;SelectConfEy&quot; );   \/\/ not required\nconst numPocketEx    = configs.getObject ( &quot;SelectConfEx&quot; );   \/\/ not required\n\nconst strDigitMin    = configs.get       ( &quot;StrConfF&quot; );       \/\/ not required\n  let numDigitMin    = parseInt( strDigitMin, 10 );   \/\/ Int or NaN\nconst strDigitMax    = configs.get       ( &quot;StrConfG&quot; );       \/\/ not required\n  let numDigitMax    = parseInt( strDigitMax, 10 );   \/\/ Int or NaN\n\n\n\n\/\/\/\/ == Data Retrieving \/ \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u306e\u53c2\u7167 ==\n\/\/ (Nothing. Retrieved via Expression Language in Config Retrieving)\n\n\n\n\/\/\/\/ == Calculating \/ \u6f14\u7b97 ==\nlet arrOutputTsv  = [];\n\nif ( boolHeaderOn ){\n  let arrTmp = arr2dTsv.shift();   \/\/ Remove First Element\n  arrTmp.push ( strOperator );\n  arrOutputTsv.push ( arrTmp.join( &#39;\\t&#39; ) );\n}\n\nfor ( let i = 0; i &lt; arr2dTsv.length; i++ ) {\n  let arrTmp = arr2dTsv[i].slice();\n\n  let numX;\n  if ( !isNaN(numOperandXid) ) {\n      numX = parseFloat(arr2dTsv[i][numOperandXid].replace(\/,\/g, &#39;&#39;));\n  }\n  if ( isNaN(numX) ) { \/\/ numOperandXid\u304cNaN\u306e\u5834\u5408\u3001\u307e\u305f\u306fTSV\u304b\u3089\u306e\u30d1\u30fc\u30b9\u7d50\u679c\u304cNaN\u306e\u5834\u5408\n      numX = numOperandXv;\n  }\n  if ( isNaN(numX) ){\n    arrTmp.push ( &quot;#N\/A&quot; );\n    arrOutputTsv.push ( arrTmp.join( &#39;\\t&#39; ) );\n    continue;\n  }\n\n  let numY;\n  if ( !isNaN(numOperandYid) ) {\n      numY = parseFloat(arr2dTsv[i][numOperandYid].replace(\/,\/g, &#39;&#39;));\n  }\n  if ( isNaN(numY) ) { \/\/ numOperandYid\u304cNaN\u306e\u5834\u5408\u3001\u307e\u305f\u306fTSV\u304b\u3089\u306e\u30d1\u30fc\u30b9\u7d50\u679c\u304cNaN\u306e\u5834\u5408\n      numY = numOperandYv;\n  }\n  if ( isNaN(numY) ){\n    arrTmp.push ( &quot;#N\/A&quot; );\n    arrOutputTsv.push ( arrTmp.join( &#39;\\t&#39; ) );\n    continue;\n  }\n\n  if ( strOperator === &#39;divide&#39; && numY === 0 ) {\n    arrTmp.push(&quot;#DIV\/0!&quot;);\n    arrOutputTsv.push(arrTmp.join(&#39;\\t&#39;));\n    continue;\n  }\n\n  let numResult = 0;\n  switch ( strOperator ) {\n    case &#39;add&#39;:       numResult = numX + numY; break;\n    case &#39;subtract&#39;:  numResult = numX - numY; break;\n    case &#39;multiply&#39;:  numResult = numX * numY; break;\n    case &#39;divide&#39;:    numResult = numX \/ numY; break;\n    case &#39;remainder&#39;: numResult = numX % numY; break;\n    case &#39;power&#39;:     numResult = numX ** numY; break;\n    default:          throw new Error( &quot;\\n AutomatedTask RuntimeError:&quot; +\n                        &quot; Unsupported operator: &quot; + strOperator + &quot;\\n&quot; );\n  }\n\n  if ( boolSeparatorOn ){\n    let formatOptions = {};\n    if ( !isNaN(numDigitMin) ) formatOptions.minimumFractionDigits = numDigitMin;\n    if ( !isNaN(numDigitMax) ) formatOptions.maximumFractionDigits = numDigitMax;\n    arrTmp.push( numResult.toLocaleString( undefined, formatOptions ) );\n  } else {\n    arrTmp.push ( numResult );\n  }\n\n  arrOutputTsv.push ( arrTmp.join( &#39;\\t&#39; ) );\n}\n\n\n\n\/\/\/\/ == Data Updating \/ \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u3078\u306e\u4ee3\u5165 ==\n\/\/\/ ref) Retrieving \/ Updating from ScriptTasks\n\/\/\/ https:\/\/questetra.zendesk.com\/hc\/en-us\/articles\/360024574771-R2301\n\/\/\/ https:\/\/questetra.zendesk.com\/hc\/en-us\/articles\/360024574771-R2301\n\nif ( strPocketC !== null ){ \n  engine.setData( strPocketC, arrOutputTsv?.join( &#39;\\n&#39; ) ?? &quot;&quot; );\n}\n\nif ( numPocketDy !== null ){ \n  engine.setData( numPocketDy, new java.math.BigDecimal( numInputTsvLines ) );\n}\nif ( numPocketDx !== null ){ \n  engine.setData( numPocketDx, new java.math.BigDecimal( numInputTsvCols ) );\n}\nif ( numPocketEy !== null ){ \n  engine.setData( numPocketEy, new java.math.BigDecimal( arrOutputTsv.length ) );\n}\nif ( numPocketEx !== null ){ \n  engine.setData( numPocketEx, new java.math.BigDecimal( arrOutputTsv[0].split(&quot;\\t&quot;).length ) );\n}\n\n\n\n} \/\/\/\/\/\/\/\/ END &quot;main()&quot; \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\n\n\n\/**\n * Parses a TSV (Tab-Separated Values) string and returns a 2D array with rectangular shape.\n * This function ensures that each row in the resulting 2D array has the same number of columns,\n * equal to the widest row in the original TSV input. Shorter rows are padded with empty strings.\n * Blank lines in the input are ignored.\n * Additionally, the function logs the minimum and maximum column counts (excluding blank lines),\n * along with the total number of lines and count of blank lines.\n * \n * TSV\uff08\u30bf\u30d6\u533a\u5207\u308a\u5024\uff09\u5f62\u5f0f\u306e\u6587\u5b57\u5217\u3092\u89e3\u6790\u3057\u30012\u6b21\u5143\u306e\u914d\u5217\u3068\u3057\u3066\u6574\u5f62\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002\n * \u5165\u529b\u3055\u308c\u305fTSV\u6587\u5b57\u5217\u3092\u884c\u5358\u4f4d\u3067\u5206\u5272\u3057\u3001\u5404\u884c\u306e\u30bb\u30eb\u6570\u3092\u305d\u308d\u3048\u3066\u300c\u9577\u65b9\u5f62\uff08\u77e9\u5f62\uff09\u300d\u306e\u5f62\u306b\u6574\u3048\u307e\u3059\u3002\n * \u6700\u3082\u30bb\u30eb\u6570\u304c\u591a\u3044\u884c\u306b\u5408\u308f\u305b\u3066\u3001\u30bb\u30eb\u6570\u304c\u8db3\u308a\u306a\u3044\u884c\u306b\u306f\u7a7a\u6587\u5b57\u5217\uff08&quot;&quot;\uff09\u3092\u88dc\u5b8c\u3057\u307e\u3059\u3002\n * \u7a7a\u884c\uff08\u4e2d\u8eab\u304c\u7a7a\u306e\u884c\uff09\u306f\u7121\u8996\u3055\u308c\u307e\u3059\u3002\n * \u307e\u305f\u3001\u6700\u5c0f\u5217\u6570\u30fb\u6700\u5927\u5217\u6570\u30fb\u5168\u4f53\u306e\u884c\u6570\u30fb\u7a7a\u884c\u306e\u6570\u3092\u30ed\u30b0\u306b\u51fa\u529b\u3057\u307e\u3059\uff08engine.log\uff09\u3002\n * \n * \n * @param {string} strTsv - The raw TSV string, with rows separated by newline characters (`\\n`) \n *                          and cells separated by tab characters (`\\t`).\n * \n * @returns {string[][]} A two-dimensional array where each sub-array represents a row from the TSV input,\n *                       padded with empty strings to ensure uniform column width.\n * \n * @example\n * const tsv = &quot;a\\tb\\tc\\n1\\t2\\nx\\ty\\tz\\tw\\n&quot;;\n * const result = parseAsRectangular(tsv);\n * \/\/ result:\n * \/\/ [\n * \/\/   [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;&quot;],\n * \/\/   [&quot;1&quot;, &quot;2&quot;, &quot;&quot;, &quot;&quot;],\n * \/\/   [&quot;x&quot;, &quot;y&quot;, &quot;z&quot;, &quot;w&quot;]\n * \/\/ ]\n *\/\n\nfunction parseAsRectangular( strTsv ){\n  const arrTsv = strTsv.split(&quot;\\n&quot;);\n\n  \/\/\/ Get numMinWidth and numMaxWidth (blank lines are excluded)\n  let numMinWidth   = Infinity; \/\/ cf. String-Type Max: 1 million\n  let numMaxWidth   = 0;\n  let numBlanklines = 0;\n  for( let i = 0; i &lt; arrTsv.length; i++ ){\n    if( arrTsv[i] === &quot;&quot; ){ \/\/ Skip blank lines\n      numBlanklines += 1;\n      continue;\n    }\n    let arrCells = arrTsv[i].split(&quot;\\t&quot;);\n    if( numMinWidth &gt; arrCells.length ){ numMinWidth = arrCells.length; }\n    if( numMaxWidth &lt; arrCells.length ){ numMaxWidth = arrCells.length; }\n  }\n  engine.log( &quot; AutomatedTask TsvDataCheck:&quot; + \n              &quot; MinWidth:&quot; + numMinWidth +\n              &quot; MaxWidth:&quot; + numMaxWidth +\n              &quot; Lines:&quot; + arrTsv.length +\n              &quot; (BlankLines:&quot; + numBlanklines + &quot;)&quot; );\n\n  \/\/\/ Get numMinWidth and numMaxWidth (blank lines are excluded)\n  let arr2dTsv      = [];\n  for( let i = 0; i &lt; arrTsv.length; i++ ){\n    if( arrTsv[i] === &quot;&quot; ){ \/\/ Skip blank lines\n      continue;\n    }\n    let arrTmp = [];\n    let arrCells = arrTsv[i].split(&quot;\\t&quot;);\n    for( let j = 0; j &lt; numMaxWidth; j++ ){\n      if( j &lt; arrCells.length ){\n        arrTmp[j] = arrCells[j];\n      }else{\n        arrTmp[j] = &quot;&quot;;\n      }\n    }\n    arr2dTsv.push( arrTmp );\n  }\n\n  return arr2dTsv;\n}\n\n\n\n\/*\n### NOTES\n- When the process reaches this [Automated Step], the calculation processing is automatically executed.\n    - The calculation result is added to the rightmost column at the output TSV.\n    - Binary operations can be set using numeric column X and numeric column Y (column IDs starting from zero).\n    - One of XY can also be set to a fixed value.\n- TSV (Tab Separated Values) text is assumed to be rectangular data.\n    - TSV text: monthly sales tally, monthly access tally, etc.\n    - Data that is not rectangular is automatically formatted with blank characters.\n    - Blank lines (including trailing newlines) are ignored.\n- Numeric columns are parsed with JavaScript `parseFloat()` after removing commas (thousand separators).\n    - The characters accepted are plus\/minus signs, decimal digits, decimal points (.), exponent indicators, and the infinity symbol.\n    - If it cannot be converted to a number, it is calculated using the default value.\n    - If no column ID is specified for XY, it is calculated using the default value (fixed value).\n    - If the default value is also not set, `#N\/A` will be output.\n    - If the value of Y is &quot;0&quot; during division, `#DIV\/0!` will be output.\n- To arrange the sort order of the output TSV, place the add-on step &quot;TSV String, Convert&quot; downstream in the workflow.\n    - https:\/\/support.questetra.com\/addons\/tsv-string-convert-2021\/\n\n### NOTES-ja\n- \u6848\u4ef6\u30d7\u30ed\u30bb\u30b9\u304c\u3053\u306e\u81ea\u52d5\u5de5\u7a0b\u306b\u5230\u9054\u3057\u305f\u969b\u3001TSV\u30c6\u30ad\u30b9\u30c8\u304c\u8aad\u307f\u8fbc\u307e\u308c\u300c\u8a08\u7b97\u51e6\u7406\u300d\u304c\u81ea\u52d5\u5b9f\u884c\u3055\u308c\u307e\u3059\n    - \u8a08\u7b97\u7d50\u679c\u304c\u6700\u53f3\u5217\u306b\u5217\u8ffd\u52a0\u3055\u308c\u305fTSV\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\n    - \u6570\u5024\u5217X\u3068\u6570\u5024\u5217Y\u306b\u3088\u308b\u4e8c\u9805\u6f14\u7b97\u304c\u8a2d\u5b9a\u53ef\u80fd\u3067\u3059\uff08\u5217ID\u306f\u30bc\u30ed\u59cb\u307e\u308a\u3067\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\uff09\n    - XY\u306e\u4e00\u65b9\u3092\u56fa\u5b9a\u5024\u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\n- TSV\uff08Tab Separated Values\uff09\u30c6\u30ad\u30b9\u30c8\u306f\u3001\u77e9\u5f62\u30c7\u30fc\u30bf\u3092\u524d\u63d0\u3068\u3057\u307e\u3059\n    - TSV\u30c6\u30ad\u30b9\u30c8: \u6708\u6b21\u58f2\u4e0a\u96c6\u8a08\u3001\u6708\u6b21\u30a2\u30af\u30bb\u30b9\u96c6\u8a08\u3001\u306a\u3069\n    - \u77e9\u5f62\u3067\u306a\u3044\u30c7\u30fc\u30bf\u306f\u3001\u7a7a\u6587\u5b57\u306b\u3088\u3063\u3066\u81ea\u52d5\u6574\u5f62\u3055\u308c\u307e\u3059\n    - \u7a7a\u884c\uff08\u672b\u5c3e\u6539\u884c\u3092\u542b\u3080\uff09\u306f\u7121\u8996\u3055\u308c\u307e\u3059\n- \u6570\u5024\u5217\u306f\u3001\u30ab\u30f3\u30de\uff08\u6841\u533a\u5207\u308a\u6587\u5b57\uff09\u3092\u9664\u53bb\u3057\u305f\u3046\u3048\u3067\u3001JavaScript `parseFloat()` \u3067\u89e3\u6790\u3055\u308c\u307e\u3059\n    - \u6b63\u8ca0\u7b26\u53f7\u3001\u6570\u5024\u3001\u5c0f\u6570\u70b9 (.)\u3001\u6307\u6570\u8a18\u53f7\u3001\u304a\u3088\u3073 `Infinity` \u304c\u8a8d\u8b58\u53ef\u80fd\u3067\u3059\n    - \uff08\u4ee5\u5916\u306e\u6587\u5b57\u306b\u906d\u9047\u3057\u305f\u3089\u3001\u305d\u306e\u6587\u5b57\u306e\u524d\u307e\u3067\u306e\u5024\u3092\u8fd4\u3057\u307e\u3059\uff09\n    - \u6570\u5024\u306b\u5909\u63db\u3067\u304d\u306a\u304b\u3063\u305f\u5834\u5408\u306f\u3001\u300c\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u300d\u306b\u3066\u8a08\u7b97\u3055\u308c\u307e\u3059\n    - XY\u306b\u5217ID\u3092\u6307\u5b9a\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u306f\u3001\u300c\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u300d\u306b\u3066\u8a08\u7b97\u3055\u308c\u307e\u3059\uff08\u56fa\u5b9a\u5024\uff09\n    - \u300c\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u300d\u3082\u672a\u8a2d\u5b9a\u3060\u3063\u305f\u5834\u5408\u3001 `#N\/A` \u304c\u51fa\u529b\u3055\u308c\u307e\u3059\n    - \u9664\u7b97\u6642\u306bY\u306e\u5024\u304c &quot;0&quot; \u3060\u3063\u305f\u5834\u5408\u3001 `#DIV\/0!` \u304c\u51fa\u529b\u3055\u308c\u307e\u3059\n- \u51fa\u529bTSV\u306e\u4e26\u3073\u9806\u3092\u5909\u66f4\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u4e0b\u6d41\u306b\u300eTSV \u6587\u5b57\u5217, \u5909\u63db\u300f\u3092\u914d\u7f6e\u3057\u307e\u3059\u3002\n    - https:\/\/support.questetra.com\/ja\/addons\/tsv-string-convert-2021\/\n\n### APPENDIX\n- If the first line is a header row, the column name of the calculation result will be the operator name.\n    - &quot;add&quot;, &quot;subtract&quot;, &quot;multiply&quot;, &quot;divide&quot;, &quot;remainder&quot; or &quot;power&quot;\n- e.g.: Add column A (column ID: &quot;0&quot;) and column B (column ID: &quot;1&quot;)\n    - Operator: `Addition: X+Y`\n    - Column ID of X: `0`\n    - Column ID of Y: `1`\n- e.g.: Calculate 1.1 times the value of column C (column ID: &quot;2&quot;)\n    - Operator: `Multiplication: X*Y`\n    - Column ID of X: `2`\n    - Default value of X: `0`\n    - Column ID of Y: `null` (not set)\n    - Default value of Y: &quot;1.1&quot;\n\n### APPENDIX-ja\n- 1\u884c\u76ee\u304c\u30d8\u30c3\u30c0\u884c\u306e\u5834\u5408\u3001\u8a08\u7b97\u7d50\u679c\u5217\u306e\u5217\u540d\u306f\u6f14\u7b97\u5b50\u540d\u3068\u306a\u308a\u307e\u3059\n    - &quot;add&quot;, &quot;subtract&quot;, &quot;multiply&quot;, &quot;divide&quot;, &quot;remainder&quot;, &quot;power&quot;\n- eg: A\u5217(\u5217ID:&quot;0&quot;)\u3068B\u5217(\u5217ID:&quot;1&quot;) \u306e\u52a0\u7b97\n    - \u6f14\u7b97\u5b50: `\u52a0\u7b97: X+Y`\n    - X\u306e\u5217ID: `0`\n    - Y\u306e\u5217ID: `1`\n- eg: C\u5217 (\u5217ID:&quot;2&quot;) \u306e\u5024\u306e1.1\u500d\u3092\u8a08\u7b97\n    - \u6f14\u7b97\u5b50: `\u4e57\u7b97: X*Y`\n    - X\u306e\u5217ID: `2`\n    - X\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024: `0`\n    - Y\u306e\u5217ID: `null` (\u672a\u8a2d\u5b9a)\n    - Y\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024: `1.1`\n*\/\n\n<\/code><\/pre><\/div>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--60)\"><span style=\"text-decoration: underline;\">Download<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/drive.google.com\/file\/d\/1RIi7SoWimsRGK--xQ5OH6A51ze7Tudob\/view?usp=drivesdk\" target=\"_blank\">tsv-string-basic-math-on-numeric-column-2025.xml<\/a>\n<ul class=\"wp-block-list\">\n<li>2025-07-02 (C) Questetra, Inc. (MIT License)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<div class=\"has-small-font-size\" style=\"text-align: right;\"><div style=\"display: inline-block; background: #FBE7DD; text-align: center;\">\n<span class=\"material-icons\">warning<\/span> Freely modifiable JavaScript (ECMAScript) code. No warranty of any kind.<br>\n(Installing <em><strong>Addon Auto-Steps<\/strong><\/em> are available only on the <em><strong><span style=\"color: #1970B9\">Professional<\/span><\/strong><\/em> edition.)\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--60)\"><span style=\"text-decoration: underline;\">Notes<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When the process reaches this [Automated Step], the &#8220;calculation process&#8221; is automatically executed.\n<ul class=\"wp-block-list\">\n<li>The calculation result is added to the rightmost column at the output TSV.<\/li>\n\n\n\n<li>Binary operations can be set using numeric column X and numeric column Y (column IDs starting from zero).<\/li>\n\n\n\n<li>One of XY can also be set to a fixed value.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>TSV (Tab Separated Values) text is assumed to be rectangular data.\n<ul class=\"wp-block-list\">\n<li>TSV text: monthly sales tally, monthly access tally, etc.<\/li>\n\n\n\n<li>Data that is not rectangular is automatically formatted with blank characters.<\/li>\n\n\n\n<li>Blank lines (including trailing newlines) are ignored.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Numeric columns are parsed with JavaScript <code>parseFloat()<\/code> after removing commas (thousand separators).\n<ul class=\"wp-block-list\">\n<li>The characters accepted are plus\/minus sign, decimal digits, decimal point (.), exponent indicator, and the <code>Infinity<\/code> literal.<\/li>\n\n\n\n<li>If it cannot be converted to a number, it is calculated using the &#8220;default value&#8221;.<\/li>\n\n\n\n<li>If no column ID is specified for XY, it is calculated using the &#8220;default value&#8221; (fixed value).<\/li>\n\n\n\n<li>If the &#8220;default value&#8221; is also not set, <code>#N\/A<\/code> will be output.<\/li>\n\n\n\n<li>If the value of Y is &#8220;0&#8221; during division, <code>#DIV\/0!<\/code> will be output.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>To arrange the sort order of the output TSV, place &#8220;TSV String, Convert&#8221; downstream in the workflow.\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/support.questetra.com\/addons\/tsv-string-convert-2021\/\">https:\/\/support.questetra.com\/addons\/tsv-string-convert-2021\/<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--60)\"><span style=\"text-decoration: underline;\">Capture<\/span><\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"628\" data-attachment-id=\"174581\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/collab-chat-basics-part2\/attachment\/tsv-string-basic-math-on-numeric-column-2025-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?fit=1200%2C628&amp;ssl=1\" data-orig-size=\"1200,628\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"tsv-string-basic-math-on-numeric-column-2025-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?fit=1024%2C536&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=1200%2C628&#038;ssl=1\" alt=\"\" class=\"wp-image-174581\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?w=1200&amp;ssl=1 1200w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=600%2C315&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=1024%2C536&amp;ssl=1 1024w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=768%2C402&amp;ssl=1 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large has-custom-border is-style-rounded is-style-rounded--1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"535\" height=\"630\" data-attachment-id=\"174579\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/collab-chat-basics-part2\/attachment\/tsv-string-basic-math-on-numeric-column-2025-config-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-config-en.png?fit=969%2C1142&amp;ssl=1\" data-orig-size=\"969,1142\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"tsv-string-basic-math-on-numeric-column-2025-config-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-config-en.png?fit=535%2C630&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-config-en-535x630.png?resize=535%2C630&#038;ssl=1\" alt=\"\" class=\"has-border-color wp-image-174579\" style=\"border-color:#009900;border-width:3px;border-radius:9px\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-config-en.png?resize=535%2C630&amp;ssl=1 535w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-config-en.png?resize=267%2C315&amp;ssl=1 267w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-config-en.png?resize=768%2C905&amp;ssl=1 768w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-config-en.png?w=969&amp;ssl=1 969w\" sizes=\"auto, (max-width: 535px) 100vw, 535px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--60)\"><span style=\"text-decoration: underline;\">Appendix<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the first line is a header row, the column name of the calculation result will be the operator name.\n<ul class=\"wp-block-list\">\n<li>&#8220;add&#8221;, &#8220;subtract&#8221;, &#8220;multiply&#8221;, &#8220;divide&#8221;, &#8220;remainder&#8221; or &#8220;power&#8221;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>e.g.: Add column A (column ID: &#8220;0&#8221;) and column B (column ID: &#8220;1&#8221;)\n<ul class=\"wp-block-list\">\n<li>Operator: <code>Addition: X+Y<\/code><\/li>\n\n\n\n<li>Column ID of X: <code>0<\/code><\/li>\n\n\n\n<li>Column ID of Y: <code>1<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>e.g.: Calculate 1.1 times the value of column C (column ID: &#8220;2&#8221;)\n<ul class=\"wp-block-list\">\n<li>Operator: <code>Multiplication: X*Y<\/code><\/li>\n\n\n\n<li>Column ID of X: <code>2<\/code><\/li>\n\n\n\n<li>Default value of X: <code>0<\/code><\/li>\n\n\n\n<li>Column ID of Y: <code>null<\/code> (not set)<\/li>\n\n\n\n<li>Default value of Y: &#8220;1.1&#8221;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--60)\"><span style=\"text-decoration: underline;\">See Also<\/span><\/h3>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-questetra-support wp-block-embed-questetra-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"AEOvI7jS4l\"><a href=\"https:\/\/support.questetra.com\/en\/addons\/tsv-string-extract-by-regexp-for-each-line-2025\/\">#TSV-String: Extract by RegExp for each Line<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;#TSV-String: Extract by RegExp for each Line&#8221; &#8212; Questetra Support\" src=\"https:\/\/support.questetra.com\/addons\/tsv-string-extract-by-regexp-for-each-line-2025\/embed\/#?secret=9dLJQCry2K#?secret=AEOvI7jS4l\" data-secret=\"AEOvI7jS4l\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-questetra-support wp-block-embed-questetra-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"WdWIscm4qo\"><a href=\"https:\/\/support.questetra.com\/en\/addons\/tsv-string-convert-2021\/\">TSV String, Convert<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;TSV String, Convert&#8221; &#8212; Questetra Support\" src=\"https:\/\/support.questetra.com\/addons\/tsv-string-convert-2021\/embed\/#?secret=ciOFeiteZr#?secret=WdWIscm4qo\" data-secret=\"WdWIscm4qo\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Adds the calc result as a new column. The result of binary calculations such as &#8220;adding column A and column B&#8221; or &#8220;multiplying column C by 1.1&#8221; are added to the end of each TSV row. Subtraction, division, remainder, and exponentiation also supported.<\/p>\n","protected":false},"author":2,"featured_media":174581,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[168],"tags":[389],"class_list":["post-174585","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-addons","tag-tsv-csv"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?fit=1200%2C628&ssl=1","uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?fit=1200%2C628&ssl=1",1200,628,false],"thumbnail":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=440%2C440&ssl=1",440,440,true],"medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?fit=600%2C315&ssl=1",600,315,true],"medium_large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?fit=768%2C402&ssl=1",768,402,true],"large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?fit=1024%2C536&ssl=1",1024,536,true],"1536x1536":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?fit=1200%2C628&ssl=1",1200,628,true],"2048x2048":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?fit=1200%2C628&ssl=1",1200,628,true],"newspack-article-block-landscape-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=1200%2C628&ssl=1",1200,628,true],"newspack-article-block-portrait-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=900%2C628&ssl=1",900,628,true],"newspack-article-block-square-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=1200%2C628&ssl=1",1200,628,true],"newspack-article-block-landscape-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=800%2C600&ssl=1",800,600,true],"newspack-article-block-portrait-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=600%2C628&ssl=1",600,628,true],"newspack-article-block-square-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=800%2C628&ssl=1",800,628,true],"newspack-article-block-landscape-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=600%2C450&ssl=1",600,450,true],"newspack-article-block-portrait-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=450%2C600&ssl=1",450,600,true],"newspack-article-block-square-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=600%2C600&ssl=1",600,600,true],"newspack-article-block-landscape-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=400%2C300&ssl=1",400,300,true],"newspack-article-block-portrait-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=300%2C400&ssl=1",300,400,true],"newspack-article-block-square-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=400%2C400&ssl=1",400,400,true],"newspack-article-block-landscape-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=200%2C150&ssl=1",200,150,true],"newspack-article-block-portrait-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=150%2C200&ssl=1",150,200,true],"newspack-article-block-square-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?resize=200%2C200&ssl=1",200,200,true],"newspack-article-block-uncropped":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2025\/07\/tsv-string-basic-math-on-numeric-column-2025-en.png?fit=1200%2C628&ssl=1",1200,628,true]},"uagb_author_info":{"display_name":"IMAMURA, Genichi","author_link":"https:\/\/support.questetra.com\/en\/author\/imamuragenichi\/"},"uagb_comment_info":3,"uagb_excerpt":"Adds the calc result as a new column. The result of binary calculations such as \"adding column A and column B\" or \"multiplying column C by 1.1\" are added to the end of each TSV row. Subtraction, division, remainder, and exponentiation also supported.","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-JpT","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":78218,"url":"https:\/\/support.questetra.com\/en\/addons\/tsv-string-add-n-to-number-column\/","url_meta":{"origin":174585,"position":0},"title":"TSV String; Add N to Number Column","author":"IMAMURA, Genichi","date":"2019-08-01","format":false,"excerpt":"Generates a new TSV with adding N to each number in the number column. Calculation results are added at the end of the line. Available at discounted price table etc. Removes whitespace from both ends of a string.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-N-to-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-N-to-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-N-to-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-N-to-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-N-to-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":78314,"url":"https:\/\/support.questetra.com\/en\/addons\/tsv-string-sum-of-number-column\/","url_meta":{"origin":174585,"position":1},"title":"TSV String; Sum of Number Column","author":"IMAMURA, Genichi","date":"2019-08-05","format":false,"excerpt":"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.","rel":"","context":"In &quot;\u30a2\u30c9\u30aa\u30f3&quot;","block_context":{"text":"\u30a2\u30c9\u30aa\u30f3","link":"https:\/\/support.questetra.com\/ja\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/TSV-String-Sum-of-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/TSV-String-Sum-of-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/TSV-String-Sum-of-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/TSV-String-Sum-of-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/TSV-String-Sum-of-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":78199,"url":"https:\/\/support.questetra.com\/en\/addons\/tsv-string-multiply-n-by-number-column\/","url_meta":{"origin":174585,"position":2},"title":"TSV String; Multiply N by Number Column","author":"IMAMURA, Genichi","date":"2019-08-01","format":false,"excerpt":"Generates a new TSV with multiplying N by each number in the number column. Calculation results are rounded off and added at the end of the line. Available for tax calculation etc. Removes whitespace from both ends of a string.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"TSV String; Multiply N by Number Column","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Multiply-N-by-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Multiply-N-by-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Multiply-N-by-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Multiply-N-by-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Multiply-N-by-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":78242,"url":"https:\/\/support.questetra.com\/en\/addons\/tsv-string-add-prefix-to-column\/","url_meta":{"origin":174585,"position":3},"title":"TSV String; Add Prefix to Column","author":"IMAMURA, Genichi","date":"2019-08-02","format":false,"excerpt":"Generates a new TSV with concatenating the prefix Str to all cells in the column. The concatenated strings are added at the end of the line. Available at categorization etc. Removes whitespace from both ends of a string.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-Prefix-to-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-Prefix-to-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-Prefix-to-Column-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-Prefix-to-Column-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-Prefix-to-Column-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":109874,"url":"https:\/\/support.questetra.com\/en\/addons\/tsv-string-add-n-to-number-column-2021\/","url_meta":{"origin":174585,"position":4},"title":"TSV String; Add N to Number Column","author":"Hirotaka NISHI","date":"2021-07-19","format":false,"excerpt":"Generates a new TSV with adding N to each number in the number column. Calculation results are added at the end of the line. Available at discounted price table etc. Removes whitespace from both ends of a string.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-N-to-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-N-to-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-N-to-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-N-to-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-N-to-Number-Column-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":78278,"url":"https:\/\/support.questetra.com\/en\/addons\/tsv-string-add-suffix-to-column\/","url_meta":{"origin":174585,"position":5},"title":"TSV String; Add Suffix to Column","author":"IMAMURA, Genichi","date":"2019-08-05","format":false,"excerpt":"Generates a new TSV with concatenating the suffix Str to all cells in the column. The concatenated strings are added at the end of the line. Available for name honorifics or currency units etc. Removes whitespace from both ends of a string.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"Addon: TSV String; Add Suffix to Column","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-Suffix-to-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-Suffix-to-Column-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-Suffix-to-Column-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-Suffix-to-Column-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/Tsv-String-Add-Suffix-to-Column-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/174585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/comments?post=174585"}],"version-history":[{"count":7,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/174585\/revisions"}],"predecessor-version":[{"id":174712,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/174585\/revisions\/174712"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/174581"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=174585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=174585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=174585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}