sheetjs
sheetjs copied to clipboard
Date not preserved from CSV to XLSX
trafficstars
I'm reading some csv data and try to convert it to XLSX. I have a datetime column and it seems the data is not preserved correctly between CSV and XLSX.
I joined some screenshot opened with numebrs and google spread sheet. It is a known issue ? If I use excel will the data be preserved (having a datetime and not a date or just a number) ? Or maybe I did miss an option ? ( I added cellDates: true on reading and writing) ?
CSV
XLSX
import on google spreadsheet
I found similar and ended up (rightly or wrongly) using this function/library to do the conversion
import { getJsDateFromExcel } from 'excel-date-to-js