Class AbstractXlsxStreamingView

All Implemented Interfaces:
Aware, BeanNameAware, ApplicationContextAware, ServletContextAware, View

public abstract class AbstractXlsxStreamingView extends AbstractXlsxView
Convenient superclass for Excel document views in the Office 2007 XLSX format, using POI's streaming variant. Compatible with Apache POI 3.9 and higher.

For working with the workbook in subclasses, see Apache's POI site.

Since:
4.2
Author:
Juergen Hoeller
  • Constructor Details

    • AbstractXlsxStreamingView

      public AbstractXlsxStreamingView()
  • Method Details

    • createWorkbook

      protected org.apache.poi.xssf.streaming.SXSSFWorkbook createWorkbook(Map<String,Object> model, HttpServletRequest request)
      This implementation creates a SXSSFWorkbook for streaming the XLSX format.
      Overrides:
      createWorkbook in class AbstractXlsxView
      Parameters:
      model - the model Map
      request - current HTTP request (for taking the URL or headers into account)
      Returns:
      the new Workbook instance
    • renderWorkbook

      protected void renderWorkbook(org.apache.poi.ss.usermodel.Workbook workbook, HttpServletResponse response) throws IOException
      This implementation disposes of the SXSSFWorkbook when done with rendering.
      Overrides:
      renderWorkbook in class AbstractXlsView
      Parameters:
      workbook - the POI Workbook to render
      response - current HTTP response
      Throws:
      IOException - when thrown by I/O methods that we're delegating to
      See Also:
      • SXSSFWorkbook.dispose()