HI!
I am trying to convert my php based report into excel by using below code. everything is working fine, but the date is changed to different format. How can i fixed that issue. Can expert guide me about this ???
excel export code
So if it looks one way in the raw XSLX file, and a different in the excel app, that’s not a problem in the script, it’s how excel is formatting the date. You can change that in excel.
its showing same output every where some thing like below image . As showing in image, first three top row its in mm-dd-yy format, after three row its in dd/mm/yyyy and so on
this is html/page page from where i export into excel format. The standard format in below html page is dd/mm/yyyy. Should I try to change the html date format into dd-mmm-yy ??? may be it can solve the issue ?
I will assume (because it hasnt been specified) that you are using SheetJS to convert this, because it’s the only function reference i can find in google that appears to match.
Based on the Documentation of this function, what happens if you change var file = XLSX.utils.table_to_book(data, {sheet: "sheet1"});
to var file = XLSX.utils.table_to_book(data, {sheet: "sheet1", cellDates: true});
?