Top Description Constructors Methods
org.springframework.web.servlet.view.document

public abstract Class AbstractXlsxStreamingView

extends AbstractXlsxView
Class Inheritance
Imports
java.io.IOException, java.util.Map, jakarta.servlet.http.HttpServletRequest, .HttpServletResponse, org.apache.poi.ss.usermodel.Workbook, org.apache.poi.xssf.streaming.SXSSFWorkbook

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.

Author
Juergen Hoeller
Since
4.2

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected org.apache.poi.xssf.streaming.SXSSFWorkbook
createWorkbook(Map<String, Object>
the model Map
model
,
HttpServletRequest
current HTTP request (for taking the URL or headers into account)
request
)

Overrides org.springframework.web.servlet.view.document.AbstractXlsxView.createWorkbook.

This implementation creates a SXSSFWorkbook for streaming the XLSX format.

protected void
renderWorkbook(Workbook
the POI Workbook to render
workbook
,
HttpServletResponse
current HTTP response
response
)

Overrides org.springframework.web.servlet.view.document.AbstractXlsView.renderWorkbook.

This implementation disposes of the SXSSFWorkbook when done with rendering.

Constructor Detail

AbstractXlsxStreamingViewback to summary
public AbstractXlsxStreamingView()

Method Detail

createWorkbookback to summary
protected org.apache.poi.xssf.streaming.SXSSFWorkbook createWorkbook(Map<String, Object> model, HttpServletRequest request)

Overrides org.springframework.web.servlet.view.document.AbstractXlsxView.createWorkbook.

This implementation creates a SXSSFWorkbook for streaming the XLSX format.

Parameters
model:Map<String, Object>

Doc from org.springframework.web.servlet.view.document.AbstractXlsView.createWorkbook.

the model Map

request:HttpServletRequest

Doc from org.springframework.web.servlet.view.document.AbstractXlsView.createWorkbook.

current HTTP request (for taking the URL or headers into account)

Returns:org.apache.poi.xssf.streaming.SXSSFWorkbook

Doc from org.springframework.web.servlet.view.document.AbstractXlsView.createWorkbook.

the new Workbook instance

Annotations
@Override
renderWorkbookback to summary
protected void renderWorkbook(Workbook workbook, HttpServletResponse response) throws IOException

Overrides org.springframework.web.servlet.view.document.AbstractXlsView.renderWorkbook.

This implementation disposes of the SXSSFWorkbook when done with rendering.

Parameters
workbook:Workbook

Doc from org.springframework.web.servlet.view.document.AbstractXlsView.renderWorkbook.

the POI Workbook to render

response:HttpServletResponse

Doc from org.springframework.web.servlet.view.document.AbstractXlsView.renderWorkbook.

current HTTP response

Annotations
@Override
Exceptions
IOException:

Doc from org.springframework.web.servlet.view.document.AbstractXlsView.renderWorkbook.

when thrown by I/O methods that we're delegating to

See Also
org.apache.poi.xssf.streaming.SXSSFWorkbook#dispose()