SheetToJson is parsing date to two digits format sometimes it changes the order of the date #3234
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#3234
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Input :
Output:
Sometimes it also changes the order of the date, if anyone can help me thanks
as additional information the trouble weird cuz this date show in different format according to the spreadsheet software, in WPS office the format is correct but in microsoft excel the format is incorrect.
The number formatter assumes en-US locale. The default date format in Excel,
m/d/yy
, is locale-specific (so you will see unexpected results if your computer is not set to English (United States). See https://docs.sheetjs.com/docs/csf/features/nf#miscellany for more details.There are two workarounds for the formatted text:
A) "Apply the desired date format when parsing the file": pass the
dateNF
argument to theread
orreadFile
function. Ensure that you do not pass the optioncellText: false
.B) "Apply the desired date format when generating the array of objects": You need to set multiple options:
cellText: false, cellNF: true, cellDates: true
when reading.dateNF
argument tosheet_to_json