org.springframework.web.servlet.view.document

Class AbstractXlsxStreamingView

    • Constructor Detail

      • AbstractXlsxStreamingView

        public AbstractXlsxStreamingView()
    • Method Detail

      • createWorkbook

        protected org.apache.poi.xssf.streaming.SXSSFWorkbook createWorkbook(java.util.Map<java.lang.String,java.lang.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 java.io.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:
        java.io.IOException - when thrown by I/O methods that we're delegating to
        See Also:
        SXSSFWorkbook.dispose()