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

public abstract Class AbstractXlsxView

extends AbstractXlsView
Class Inheritance
Known Direct Subclasses
org.springframework.web.servlet.view.document.AbstractXlsxStreamingView
Imports
java.util.Map, jakarta.servlet.http.HttpServletRequest, org.apache.poi.ss.usermodel.Workbook, org.apache.poi.xssf.usermodel.XSSFWorkbook

Convenient superclass for Excel document views in the Office 2007 XLSX format (as supported by POI-OOXML). Compatible with Apache POI 3.5 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
AbstractXlsxView()

Default Constructor.

Method Summary

Modifier and TypeMethod and Description
protected Workbook
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.AbstractXlsView.createWorkbook.

This implementation creates an XSSFWorkbook for the XLSX format.

Inherited from org.springframework.web.servlet.view.document.AbstractXlsView:
buildExcelDocumentgeneratesDownloadContentrenderMergedOutputModelrenderWorkbook

Constructor Detail

AbstractXlsxViewback to summary
public AbstractXlsxView()

Default Constructor.

Sets the content type of the view to "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".

Method Detail

createWorkbookback to summary
protected Workbook createWorkbook(Map<String, Object> model, HttpServletRequest request)

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

This implementation creates an XSSFWorkbook for 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:Workbook

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

the new Workbook instance

Annotations
@Override