clarketm / TableExport

The simple, easy-to-implement library to export HTML tables to xlsx, xls, csv, and txt files.
https://tableexport.travismclarke.com/
Apache License 2.0
888 stars 289 forks source link

Date Conversion Issue #111

Open subrat7 opened 6 years ago

subrat7 commented 6 years ago

Hi

I am using Tableexport version(5.0.0),i have date in the table and while export to excel i am facing below issue

Html table data image

and excel data is image please help me how to resolve this issue,Thanks in Advance

joaociocca commented 6 years ago

Now I'm thinking this could be related to what I mentioned in https://github.com/clarketm/TableExport/issues/124#issuecomment-376320828

StuffieStephie commented 6 years ago

Before you call an instance of TableExport to the following: TableExport.prototype.typeConfig.date.assert = function(value){return false;}; I had a similar issue with P.O. Box numbers being converted to dates.

soubrunorocha commented 6 years ago

I've had a similar problem with text that was being converted to date without reason. But @StuffieStephie answer fixed my code, thanks a lot!

nowherenearithaca commented 6 years ago

yeah - I just disabled it trying to convert dates as well as described by @StuffieStephie

barman-a commented 5 years ago

Hi,

I am having the same issue in date conversion. It seems that solution from StuffieStephie is working for all, however, I am a bit confused where to add this in the code. My code looks like below.

$(function(){ $('#<?php echo $tid1; ?>').tableExport({ formats: ["xlsx", "csv"], bootstrap: true, sheetname: "sheet1", position: top, ignoreRows: null }); });