You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for MS excel format using Apache POI #123
There is no due date, it depends on the progress. There is a branch named easybatch-msexcel where I am experimenting with Apache POI. See example here.
Here is the current status of the branch:
MsExcelRecord
MsExcelRecordReader
MsExcelRecordMapper
MsExcelRecordMarshaller
MsExcelRecordWriter
You can already try it by importing the 4.1.0-SNAPSHOT version in your project.
The current reader supports only xls format, you are welcome to add support for xlsx from your implementation.
BTW, are you using the latest version 4.0? If not, I strongly recommend you to upgrade, this is the best release so far! I would love to hear your thoughts on this new version :-)
Yes we are using version 4.0 and we love it :)... As for xlsx support, our requirement is to be able to read both format by replacing one line in your MsExcelRecordReader.java
HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(file));
It took some time, but it is finally here 😄 I've added support for MsExcel XLSX support in the master branch and will be released soon. Here are the main components:
MsExcelRecord: record having apache POI Row as payload
MsExcelRecordReader: iteratively read MsExcelRecords from a xlsx file
MsExcelRecordMapper: map rows to POJOs
MsExcelRecordMarshaller: marshal POJOs to rows
MsExcelRecordWriter: write rows to a sheet in a xlsx file
I've decided to support only the new format (xlsx) but not the legacy one (xls).
Looks like apache POI provide two APIs for reading data: eventmodel (ala SAX) and usermodel (in memory). I've used the usermodel for now, which is fine for small to medium files. I'll add streaming support later on for large input files.
It would be great if you can try it with version 4.1.0-SNAPSHOT and give me your feedback. An example can be found here.
Activity
sothavirak commentedon Nov 9, 2015
Hi, when this feature is released? I actually implemented my own Ms excel reader which can support both xls and xlsx.
implement feature #123 : add support for MS Excel trough Apache POI
fmbenhassine commentedon Nov 9, 2015
Hi,
There is no due date, it depends on the progress. There is a branch named
easybatch-msexcelwhere I am experimenting with Apache POI. See example here.Here is the current status of the branch:
You can already try it by importing the
4.1.0-SNAPSHOTversion in your project.The current reader supports only xls format, you are welcome to add support for xlsx from your implementation.
BTW, are you using the latest version 4.0? If not, I strongly recommend you to upgrade, this is the best release so far! I would love to hear your thoughts on this new version :-)
Regards
Mahmoud
sothavirak commentedon Nov 10, 2015
Hi Mahmoud,
Yes we are using version 4.0 and we love it :)... As for xlsx support, our requirement is to be able to read both format by replacing one line in your MsExcelRecordReader.java
HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(file));
with
Workbook workbook = WorkbookFactory.create(new FileInputStream(file));
Thanks for the great work. This framework is rock!
Regards,
Sothavirak
fmbenhassine commentedon Nov 10, 2015
Thank you for this kind feedback! I'm glad you like it :-)
I was thinking about making the MsExcel format as a second parameter to the
MsExcelRecordReader:Or may be other names for the constants, but the idea is to make the format configurable at construction time to support both versions.
The work is in progress, keep tuned. You are welcome to contribute if you want!
Kind regards
Mahmoud
issue #123 : add support for MsExcel XLSX file format
fmbenhassine commentedon May 26, 2016
Hi Sothavirak,
It took some time, but it is finally here 😄 I've added support for MsExcel XLSX support in the master branch and will be released soon. Here are the main components:
MsExcelRecord: record having apache POIRowas payloadMsExcelRecordReader: iteratively readMsExcelRecords from a xlsx fileMsExcelRecordMapper: map rows to POJOsMsExcelRecordMarshaller: marshal POJOs to rowsMsExcelRecordWriter: write rows to a sheet in a xlsx fileI've decided to support only the new format (xlsx) but not the legacy one (xls).
Looks like apache POI provide two APIs for reading data: eventmodel (ala SAX) and usermodel (in memory). I've used the usermodel for now, which is fine for small to medium files. I'll add streaming support later on for large input files.
It would be great if you can try it with version
4.1.0-SNAPSHOTand give me your feedback. An example can be found here.Kind regards
Mahmoud
fmbenhassine commentedon Jun 12, 2016
I'm preparing to release v4.1 including this feature.
If you have any issue, please file a bug.