GetCellValue of a Date cell returns incorrect Excel Serial Date number #1351
Replies: 6 comments
-
Hi @jeffrod1 Could you share your code sample? When I use |
Beta Was this translation helpful? Give feedback.
-
Hello, According to the docs for Excel compatibility, I am using a slightly modified version of the File Import sample code in the HyperFormula guide. I am using ExcelJS and am importing that spreadsheet into HyperFormula. I have attached a zip of the code and a sample spreadsheet that shows the issue. Thank you for your time! |
Beta Was this translation helpful? Give feedback.
-
I also just realized the date |
Beta Was this translation helpful? Give feedback.
-
Thank you for spotting that @jeffrod1 @sequba is there are reason for the 1 day gap between https://hyperformula.handsontable.com/api/classes/config.html#nulldate and https://hyperformula.handsontable.com/guide/compatibility-with-microsoft-excel.html#full-configuration |
Beta Was this translation helpful? Give feedback.
-
@jeffrod1 Sorry for such a late reply. I looked at sample_code.zip that you posted, but there is a lot of code there and it's hard to analyze. Please create a minimal example that reproduces this bug. A time zone issue might be the cause of it. |
Beta Was this translation helpful? Give feedback.
-
Yes, there is. It's because of Excel's leap year bug. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am not sure if this is a bug so I wanted to ask the question in case I am doing something wrong. I am simply checking a cell's value. I know that for a cell formatted as a Date, it will return the Excel Date Serial Number (ex. 45012). When checking the value, I am getting a serial number with decimals. I have put it the values below. 2023-03-27 should have a value of 45012 without decimals. I am thinking maybe the value is taking my timezone into account? Please assist. Thank you for your time.
Serialized B13: 2023-03-27T00:00:00.000Z
Value B13: 45011.8333333333
Beta Was this translation helpful? Give feedback.
All reactions