Table cells format when exporting jQuery Datatable to Excel

Table cells format when exporting jQuery Datatable to Excel

hira12hira12 Posts: 1Questions: 1Answers: 0
edited August 10 in Free community support

I have a datatable in my application that I need to export to Excel but when the datatable is exported in excel, the format type for each cell is 'General'. However, I want all my cells to be displayed in 'Text' format in Excel.

I tried converting my data to String but it still displays the result in General. If I try to convert my data to Int then it does displays it in Number format in Excel but I want everything in Text format.

Here's the function I'm trying to change the data type:

{
   "targets": 13,
   "render": function (data, type, row){
       var d = data.toString();
       return d;
       }
}

Here I'm targeting to one column only. However, I want to target all my columns. Even targeting a single column won't work.

Any help would be appreciated.

Answers

Sign In or Register to comment.