public abstract class ExcelExportUtils extends Object
| Constructor and Description |
|---|
ExcelExportUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
exportExcel(javax.servlet.http.HttpServletResponse response,
org.apache.poi.ss.usermodel.Workbook book,
String fileName)
导出Excel文件
|
static void |
saveToFile(org.apache.poi.ss.usermodel.Workbook book,
String targetFilePath)
将excel保存到文件中
|
static void |
setExcelExportResponse(javax.servlet.http.HttpServletResponse response,
String fileName)
设置导出Excel文件所需的响应信息
|
public static void exportExcel(javax.servlet.http.HttpServletResponse response,
org.apache.poi.ss.usermodel.Workbook book,
String fileName)
throws IOException
response - 响应对象book - the workbookfileName - the file nameIOException - the IO exceptionpublic static void setExcelExportResponse(javax.servlet.http.HttpServletResponse response,
String fileName)
throws IOException
fileName - 文件名response - 响应对象IOException - IO异常public static void saveToFile(org.apache.poi.ss.usermodel.Workbook book,
String targetFilePath)
throws IOException
book - excel对象targetFilePath - 目标文件路径IOException - IO异常Copyright © 2021–2022 EasyJ????. All rights reserved.