To read Excel can we use Spring batch?

岁酱吖の 提交于 2021-02-16 09:12:14

问题


I want to know if it is possible to use Spring Batch, in order to read from an file Excel and save it in Database.

remark : the content of file Excel chang every 2 hours.

And if it is not possible with Spring Batch, what other solution can i use


回答1:


Go take a look on spring-batch-extensions for Excel. You will find some examples of ExcelItemReader and ExcelItemWriter.

Here is the introduction of the spring-batch-extensions project for Excel :

Spring Batch extension which contains ItemReader implementations for Excel. Support for both JExcel and Apache POI is available. Simple xls documents can be read with both implementations, however for reading the newer xlsx format Apache POI is required.

You just need to import sources into your IDE and use them.



来源:https://stackoverflow.com/questions/30954931/to-read-excel-can-we-use-spring-batch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!