sheetjs icon indicating copy to clipboard operation
sheetjs copied to clipboard

sheet_to_json: date value is printed the day before

Open timratha opened this issue 7 years ago • 5 comments

Hi Team,

Recently I am working about reading data which in excel sheet has the value of Date also Value(decimal value).

I am using xlsx -v 0.14.1. My purpose is to get the raw data from the excel file (exact date and value which are filled excel )

Sample Data: Date | Value 12/31/2016 | -1234567890.12345 12/31/2017 | 1234567890.12345

After I uploaded the excel file, I got: 2016-12-30 -1,234,567,890.12345 2017-12-30 1,234,567,890.12345

I find out that the date value is printed the day before. I have checked the value before converting to Json, the date value is Fri Dec 30 2016 23:59:56 GMT+0700 (Indochina Time) then once it is converted to Json the value is 2016-12-30

Is there any solution referring to this case?

timratha avatar Feb 22 '19 06:02 timratha

This bug might be linked to #1212. Can you try the fix suggested by @cdmahoney to see if your problem has the same root cause ?

I've created a pull request ( SheetJS/ssf#38 ) to fix the problem

mareek avatar Feb 26 '19 10:02 mareek

This should have been fixed in v0.16.0, please update and report back if there are issues.

SheetJSDev avatar Sep 17 '21 13:09 SheetJSDev

It is not fixed yet, using 0.16.9 version

tanishkab avatar Mar 25 '22 10:03 tanishkab

it still have the issue at version : 0.18.7

QuangVinhTran avatar May 15 '22 06:05 QuangVinhTran

Is this still not fixed? I am facing the same error.

Husain010 avatar Aug 21 '24 12:08 Husain010