You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by GitBox <gi...@apache.org> on 2026/09/18 15:17:45 UTC
[GH] (poi/date-serial-range): Workflow run "Java CI with Ant" failed!
The GitHub Actions job "Java CI with Ant" on poi.git/date-serial-range has failed.
Run started by GitHub user pjfanning (triggered by pjfanning).
Head commit for run:
e3f468927d6797d4a320584905c144775fbe2cba / PJ Fanning <pj...@users.noreply.github.com>
A date serial past 9999-12-31 is not a valid Excel date: no exception from DataFormatter, null from DateUtil
DateUtil.isValidExcelDate only rejected negative serials, so a date-formatted
cell holding anything from 2^31 up reached MathUtil.safeDoubleToInt in
DateUtil.getJavaCalendar: DataFormatter.formatCellValue and Cell.getDateCellValue
threw IllegalArgumentException, while DateUtil.getLocalDateTime silently
truncated the serial through BigDecimal.intValue (1E10 became the year 3862607,
1E308 became 1899-12-31). Excel's dates end at serial 2958465 (9999-12-31) and it
displays a date-formatted cell outside that range as ########.
- isValidExcelDate also requires the serial to be below MAX_EXCEL_DATE_SERIAL + 1,
so getJavaDate/getJavaCalendar/getLocalDateTime return null for it, as they
already did for a negative serial, and isCellDateFormatted is false
- DataFormatter shows such a value as a plain number in the General format
instead of pushing the raw double through the date format as milliseconds
since 1970 (a negative value used to come out as "1970-01-01 00:59:59", or
"-1.0" when the pattern-derived format happened not to be cached). The check
sits before the format cache, so a number format built from a date pattern is
no longer cached under that pattern and applied to valid dates formatted later.
- the csv emulation keeps its 255 #s for such values
Co-Authored-By: Claude Opus 5 (1M context) <no...@anthropic.com>
Report URL: https://github.com/apache/poi/actions/runs/35360945460
With regards,
GitHub Actions via GitBox
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org