In my datatable I have a column with date format but when export to excel the format date change to General then I can´t sort from the most recent date to the oldest date
Possible Duplicate Question https://datatables.net/forums/discussion/39605/customize-excel-export
Thank you @Apezdr, but I don't think so, I just need date format in excel. But when export the format is "General" and not "Date"
Does this answer your question?
If not then maybe start with posting your Datatables init code showing the column and buttons definitions.
Kevin had a closer example to what you're asking about but the answer is the same, you'll have to dig into the customization option of the excelHtml5 button https://datatables.net/reference/button/excelHtml5.
A helpful hint, its not easy at all to manipulate the excel document generation at length. I'd see if you can just adjust the date format that datatables spits out and see if it fixes your issue.
Hello @alogo, did you find a work around this? I'm having the same issue
When the grid data is exported ,the date columns are exported as "General" datatype. By default this needs to be exported as "Short Date".
did anyone find a solution for this ?
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.