Export PDF and Excel With Decimal Separator

Export PDF and Excel With Decimal Separator

S_PS_P Posts: 1Questions: 1Answers: 0

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

Answers

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin

    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

  • kingurukinguru Posts: 5Questions: 2Answers: 0

    Is there an update for this? I'm getting in excel from 15000.23 => 1500023
    because by native decimal separator is ","

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin

    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

  • luxorluxor Posts: 1Questions: 0Answers: 0

    Dear all,

    any news?
    I have the same problem.

    Thanks
    BR

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin

    No - there has been no changes in this regard yet.

    Allan

  • sstanislav1sstanislav1 Posts: 1Questions: 0Answers: 0
    edited October 2018

    Hi,
    Did you solve this issue?

    Thanks,

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin

    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

  • BelortaBelorta Posts: 13Questions: 3Answers: 0

    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...

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin

    Hi - sorry. Not yet, this still isn't something haven't had a chance to work on yet.

    Allan

This discussion has been closed.