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>
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
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).
# Fixed URLs
## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 33 occurrences migrated to:
https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
Removed the doCloseWorkbook method in favor of the normal doClose method.
The PoiItemReader now closes the InputStream and Workbook (for Apache POI >= 3.11)