com.web.spring.datatable.export.XlsxStreamingView Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-jquery-datatable Show documentation
Show all versions of spring-jquery-datatable Show documentation
Spring extension to work with the great jQuery plugin DataTables
package com.web.spring.datatable.export;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.servlet.view.document.AbstractXlsxStreamingView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
* The type Xlsx streaming view.
*/
public class XlsxStreamingView extends AbstractXlsxStreamingView {
@Override
protected void buildExcelDocument(
Map model, Workbook workbook, HttpServletRequest request, HttpServletResponse response)
throws Exception {
String fileName = (String) model.get("fileName");
response.setHeader("Content-disposition", "attachment; filename=\"" + fileName + "\".xlsx");
ExcelCommon.buildExcelDocument(model, workbook, request, response);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy