I'm currently generating a google document with Google Script.
I have an issue with number formats. I have a table with currency values, so I tried to format the text like this ( like how I'd do it normally ):
var number = 12345;
var currencyString = number.toLocaleString(); // This 'works' but outputs : 12345
var euroCurrencyString = number.toLocaleString("nl-NL", { style: 'currency', currency: 'EUR' }); // This throws exception
But it throws this exception: TypeError: InternalError: Illegal radix 0.
Is there any other way to format a number to a currency string? ( eq; € 12.345,00 )
EDIT: toLocaleString() actually works, I just mistyped it