I found this issue while searching for a way to use XSSF with the built-in AbstractExcelView. After a while I decided to modify the AbstractExcelView, so that it would support both formats at once. The attached file is the result of my work with it.
- I removed some utility methods, because I felt like it would just not fit there. You have (at least I did) to write your own Util class anyway to keep the code clean and easy.
- I added the method 'createWorkbook' which you have to override. This is where you decide if you want HSSF or XSSF.
- Content type will be set automatically.
- I removed the whole template stuff. As the caller is now responsible to create the workbook, it's easy to create one based on a template file (new XSSFWorkbook(resource.getInputStream())
I hope this helps someone. Feel free to change anything you want