public abstract class ExcelExportUtils extends Object
| 构造器和说明 |
|---|
ExcelExportUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 EasyJ寮�婧愮ぞ鍖�. All rights reserved.