Values with comma(,) as decimal separator is converting into english format number during excel expo

Values with comma(,) as decimal separator is converting into english format number during excel expo

v3nkyv3nky Posts: 46Questions: 11Answers: 0

Link to test case:http://live.datatables.net/gasorise/4/edit
Debugger code (debug.datatables.net):
Error messages shown: No error messages shown.
Description of problem: I have constructed the excel export functionality as mentioned in the test case in our project and here the value under salary field is getting converted into English format number automatically during export. Like in example in datatable display it shows as 0,01 but when I export into excel it is getting converted into 1which is not correct for me . Could you please advise what can be changed here to extract the same value as shown in the datatable?

Answers

  • v3nkyv3nky Posts: 46Questions: 11Answers: 0
    edited January 2021

    I have modified my test case and I am able to sort the issue . Buthere I have one more issue with respectto readin column name instead of the index of the column.

    http://live.datatables.net/gasorise/9/edit

    Here is my new test case. Could some one please help me on how to read column name while formatting the body in export options.

  • allanallan Posts: 61,740Questions: 1Answers: 10,111 Site admin

    Do you mean you want the column=6 condition (which btw is an assignment with a single =, not a test) to be based on the column name rather than the index?

    What you could do is:

    $(table.column(column).header()).text()
    

    That will reduce performance though, so use carefully.

    Allan

This discussion has been closed.