处理Excel文件使用的是Apache POI
http://poi.apache.org/spreadsheet/index.html
旧类:AbstractExcelView
新类:(Spring4.2以后引入)
AbstractXlsView
AbstractXlsxView
AbstractXlsxStreamingView
关于Spring中视图类的更新, 作者说的一段话:
Based on your suggestions, I've introduced AbstractXlsView, AbstractXlsxView and AbstractXlsxStreamingView variants, designed to work as closely as possible with POI 3.8+'s arrangements. The traditional (pre POI 3.5) AbstractExcelView has been marked as deprecated, just like AbstractJExcelView already is.
I went with separate classes (in a hierarchy) primarily for minimum dependencies imposed, i.e. no poi-ooxml dependency needed when just using HSSF. As a side benefit, the content type can also be determined in the constructor then, and the SXSSFWorkbook.dispose call can be applied in a cleaner fashion.
This will be available in the upcoming 4.2 snapshot. Feel free to give it a try...
Note that AbstractXmlxStreamingView requires POI 3.9+ due to the pretty important SXSSFWorkbook.dispose() method only being available there.
We recommend the use of POI 3.10+ where we support close() calls for existing resources in a worksheet. We do that conditionally based on an instanceof Closeable check in order to preserve POI 3.5+ compatibility in AbstractXslView and AbstractXlsxView.
Juergen