Bug 60165 - negative dates in poi for java application doesn't supported?
Summary: negative dates in poi for java application doesn't supported?
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: unspecified
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: APIBug
Depends on: 45531 46411
Blocks:
  Show dependency tree
 
Reported: 2016-09-22 12:40 UTC by Vasily S
Modified: 2016-10-11 14:33 UTC (History)
0 users



Attachments
negative dates in excel and scell (130.40 KB, image/jpeg)
2016-09-22 12:47 UTC, Vasily S
Details
Example xlsx for negative date (14.75 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-09-22 12:55 UTC, Vasily S
Details
junit test and small description of problem (101.85 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-09-27 13:59 UTC, Vasily S
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vasily S 2016-09-22 12:40:42 UTC

    
Comment 1 Vasily S 2016-09-22 12:47:30 UTC
Created attachment 34291 [details]
negative dates in excel and scell

Example how it looks in excel and scell. Scell can be downloaded from http://scell.org/download.html
Comment 2 Vasily S 2016-09-22 12:51:42 UTC
it seeams, that negative dates don't supported in actuall version of poi.
Comment 3 Vasily S 2016-09-22 12:55:12 UTC
Created attachment 34292 [details]
Example xlsx for negative date

load file in excel and in java with poi and look at F39
Comment 4 Vasily S 2016-09-22 12:55:38 UTC
It needs the support of the POI library: use 1904 date system
Comment 5 Nick Burch 2016-09-22 14:28:15 UTC
Can you please write a short junit unit test that highlights the problem? With no code, we have a very low chance of being able to fix bugs (if any)....
Comment 6 Javen O'Neal 2016-09-22 17:46:20 UTC
Possibly relevant: https://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDateUtil.java?view=markup

I believe POI supports 1900 dates, which is what Microsoft Excel uses. The xls/xslx format cannot represent earlier dates.
Search the developer list and pasy bugs. I think this question has come up before for users trying to represent medieval and BC dates.

https://support.office.com/en-us/article/DATE-function-e36c0c8c-4104-49da-ab83-82328b832349
Comment 7 Vasily S 2016-09-27 13:59:45 UTC
Created attachment 34308 [details]
junit test and small description of problem

look at attached document with junit test and small description of problem.
Comment 8 Dominik Stadler 2016-10-11 14:32:59 UTC
This is related or even a duplicate of bug 45531 and bug 46411