Datatable does not export values as they visible on data-table list
Datatable does not export values as they visible on data-table list
anujeet
Posts: 39Questions: 15Answers: 0
Hi Team,
I have created a js fiddle and below is url:
https://jsfiddle.net/Akashs/bjvf8q3a/21/
On above page we have a column "Fees" and under this column we are showing values like(''10,00, 100,00, 20,00") in Dutch format. When we export the values in to excel file then values are not exporting as they visible on the list. For example 10,00 is exporting as 1,000. Do you have any solution for this?.
Looking forward your early reply.
Thanks
This discussion has been closed.
Replies
Have you defined your decimal point as a comma?
https://datatables.net/examples/basic_init/comma-decimal.html
Buttons has a private list of possible number separators called _excelSpecials. It reads the comma as a thousand seperator.
Until this is exposed, what you could do is change your code like this so comma's are replaced with dots and those are treated as expected:
Yes, I'm afraid that Buttons does not currently support commas as the decimal place. That is something that I hope to address in a future update.
Until then, @HPB's workaround is spot on!
Regards,
Allan