Datatable Buttons - CSV Export - Only Strings allowed?

Datatable Buttons - CSV Export - Only Strings allowed?

ThorstenThorsten Posts: 7Questions: 1Answers: 0

Hi,

http://jsfiddle.net/ebRXw/721/

it seems like the csv export doesnt work if u have integer in youre dataSet. It seems like only strings are allowed. Is that behaviour expected? excel export works fine and has no problem with integer.

Best regards

Replies

  • kengrandersonkengranderson Posts: 1Questions: 0Answers: 0

    I just ran into this bug myself.
    I fixed it (in my copy of the library) by wrapping the array reference a[I] in the _exportData method with the native String() method, i.e.:

            s += boundary ?
                boundary + String(a[i]).replace( boundary, '\\'+boundary ) + boundary :
                String(a[i]);
    
This discussion has been closed.