I need to display the numbers with comma separated like 120,456.02
I tried the below method using js and it worked fine. But in apps scripts, it throws illegal radix exception
function toDec(n) {
//return parseFloat(Math.round(n * 100) / 100).toFixed(2) + ' '; will display without comma
return Number(parseFloat(Math.round(n * 100) / 100)).toLocaleString('en-US', {minimumFractionDigits: 2});
}
Any workaround available?