Reading from TSV - date (dd-MON-yy) comes through as integer #647
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
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#647
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
Lines in TSV look like (see e-mail for full file) (and yes, this is fake data):
Doing a simple:
And my excel sheet dates look like:
@psalmody good catch, and thanks for sending the file! There are actually 2 related errors (both in dates and in the IP addresses), boiling down to inappropriate use of
parseFloat
:The
isNaN
checks don't work as expected withparseFloat
, which is easy to fix: the DSV check should be replaced with the equivalent check for the DIF format.There are also two other items to address:
dateNF
/cellDates
option should be applied for the DSV formats"dd-mmm-yyyy"
from"15-NOV-2015"
)We're going to push a change sometime in the next day or two with this fix as well as a few other CSV-related issues
Any status on this?
We're testing 0.10.0 right now :)
We just pushed 0.10.0. This version addresses most of the points here and you should see reasonable results. However, we are not done here.
The missing feature is preserving the original date format when reading the CSV (detecting that "15-NOV-2015" is actually of the form
dd-mmm-yyyy
) and we need an eversion of the SSF formatting process. Keep open for nowSo it's somewhat better - now running data outputs a date value, but the cells are formatted as "General" still. Tried this with both DD-MON-YYYY format and YYYY-MM-DD
I can't reproduce the issue. Using the original text file I tried:
Since you said it was fake data, hopefully posting the output isn't an issue: SHORT_MOCK.txt.xlsx
OK - my only difference was the last line:
Hmm My reading of the spec suggests that writing a date in XLSX would automatically imply the general date format. I guess not. That will be fixed in the next release