TableExport icon indicating copy to clipboard operation
TableExport copied to clipboard

【 datetime ! 】

Open dagang007 opened this issue 7 years ago • 3 comments

Hi, while the td has value like ' 2018-08-19 16:46:05 ' , after converting to xlsx , the cell value like ' 2018-08-19 ' . Where should I set the datetime format ? THS !

dagang007 avatar Aug 20 '18 04:08 dagang007

I don't know the answer to your question, but yes, it seems that datetimes are not maintained when exported.

Fiddle here:

http://jsfiddle.net/xf3069pr/8/

own3mall avatar Aug 20 '18 06:08 own3mall

I think it's more of an Excel XLSX limitation since it does export correctly in the CSV and text file export. XLSX / Excel doesn't support datetimes by default... looks like it has to be a custom format:

https://stackoverflow.com/questions/981655/how-to-represent-a-datetime-in-excel

own3mall avatar Aug 20 '18 06:08 own3mall

excel formats can be set via css-class tableexport-* <td class="tableexport-string">2018-08-19 16:46:05</td>

Ivutar avatar Aug 28 '18 09:08 Ivutar