com.zhongweixian.excel.view.PoiBigExcelExportView Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of poi-api Show documentation
Show all versions of poi-api Show documentation
poi-api project for Spring Boot
The newest version!
package com.zhongweixian.excel.view;
import com.zhongweixian.excel.ExcelExportUtil;
import com.zhongweixian.excel.entity.ExportParams;
import com.zhongweixian.excel.entity.vo.ExcelConstants;
import com.zhongweixian.excel.handler.inter.IExcelExportServer;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* @author : caoliang
* @date : 2017/11/6:下午2:02
*/
public class PoiBigExcelExportView extends AbstractExcelView {
@Override
protected void renderMergedOutputModel(String fileName, Map model, HttpServletRequest request,
HttpServletResponse response) throws Exception {
Workbook workbook = ExcelExportUtil.exportBigExcel(
(ExportParams) model.get(ExcelConstants.PARAMS),
(Class>) model.get(ExcelConstants.CLASS), Collections.EMPTY_LIST);
IExcelExportServer server = (IExcelExportServer) model.get(ExcelConstants.DATA_INTER);
int page = 2;
List