The internal DataFormatter used from Apache POI allows for setting a fixed
Locale to use when reading numbers, dates etc. Initially we didn't set this
and thus it always used the default Locale as set from the Java runtime. This
could lead to unexpected results. We now allow to set the userLocale property
and use this to configure the DataFormatter used internally.
We also took the opportunity to make this work with the streaming ItemReader
as well as the regular ItemReader. The streaming item reader now also uses
a pre-configured DataFormatter.
Closes: #98
* Optionally use ISO formatting for dates
Prior to this commit we always used the date pattern as
assigned in the Excel workbook for the cell. Which could
lead to surprising results.
We now allow the dates to be formatted as an ISO date time with
offset, so dates/times are consistently formatted in the result.
Closes: #88
With this commit we use the isFile check introduced in
Spring 5 to check if something is an actaul file resource
instead of relying on FileNotFoundException.
Resource implementations didn't consistently throw a
FileNotFoundException (like the Google Big Query one)
leading to issues with reading.
Closes: 89
When there are blank or empty lines in the end of one sheet, null is returned by doRead without trying to read next sheet. A recursive call makes sheet moving happen when another exists.
Co-authored-by: Mahmoud Ben Hassine <mbenhassine@vmware.com>
Co-authored-by: cesar.alves@gmail.com <coa@pc-coa.caso.pt>
Both Apache POI and the AbstractItemCountingItemStreamItemReader aren't threadsafe
and thus the Excel based item readers aren't usable with multiple threads. A note
on this has been added to the documentation.
Closes: #48
Development of Spring Batch Excel continued in the original repository at
http://github.com/mdeinum/spring-batch-excel.git, with this commit we transfer all fixes, updates and new features in one go to the Spring Batch Excel repository.
The most important changes are:
- Moved to new location org.springframework.batch.extensions
- Removed support for JXL
- Initial support for reading XLSX files streaming
- Upgraded dependencies to most recent versions
- Support for reading password protected files
- Numerous small fixes
Fixes: 10,11,19,26,29,34
Closes: 13,14,30,35,50