Export PDF and Excel With Decimal Separator
Export PDF and Excel With Decimal Separator

Hai, Good People
This is my first time using datatables. all i want to ask is how do i set the value so when i exported into pdf or excel the column with number (money) will using comma or (.) as separator. i tried https://datatables.net/extensions/buttons/examples/html5/outputFormat-function.html but, it show only the numbers.
need help. thanks
This discussion has been closed.
Answers
I'm sorry, but this is a missing feature at the moment. It is something I still need to add (or pull requests that add this ability are welcome!).
Allan
Is there an update for this? I'm getting in excel from 15000.23 => 1500023
because by native decimal separator is ","
Sorry no. It will work correctly with a period for the decimal place and a comma for the thousands separator, but not yet the other way around. That is something that will be added in future.
Allan
Dear all,
any news?
I have the same problem.
Thanks
BR
No - there has been no changes in this regard yet.
Allan
Hi,
Did you solve this issue?
Thanks,
No - when it has been resolved I will post back. If you need this change urgently, the software is open source and any modifications you make would be welcome upstream.
Allan
I hate to ask, but do you have an update on this? I tried looking at the code to fix this, but my javascript-skills areby no means good enough for this.
One of the reasons for this issue is the definition of the _excelSpecials array in buttons.html5.js: it assumes that the decimal separator is always a '.'.
In the same file, around line 1074, a similar thing is done to remove the thousand-separator: in this case it removes the decimal separator instead.
Again, I'd love to help fix this, but my skills are not good enoug for a clean fix...
Hi - sorry. Not yet, this still isn't something haven't had a chance to work on yet.
Allan