类 ExcelUtil
java.lang.Object
com.alibaba.excel.EasyExcelFactory
cn.jrack.excel.core.util.ExcelUtil
public class ExcelUtil
extends com.alibaba.excel.EasyExcelFactory
Excel 工具类
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static <T> voiddownloadExcel(javax.servlet.http.HttpServletResponse response, String filename, String sheetName, Class<T> head, List<T> data) 将列表以 Excel 响应给前端static voidexportExcel(Excel excel) static <T> List<T>static <T> List<T>static <T> List<T>从类继承的方法 com.alibaba.excel.EasyExcelFactory
read, read, read, read, read, read, read, read, read, read, readSheet, readSheet, readSheet, readSheet, write, write, write, write, write, write, write, writerSheet, writerSheet, writerSheet, writerSheet, writerTable, writerTable
-
构造器详细资料
-
ExcelUtil
public ExcelUtil()
-
-
方法详细资料
-
exportExcel
- 抛出:
IOException
-
downloadExcel
public static <T> void downloadExcel(javax.servlet.http.HttpServletResponse response, String filename, String sheetName, Class<T> head, List<T> data) throws IOException 将列表以 Excel 响应给前端- 类型参数:
T- 泛型,保证 head 和 data 类型的一致性- 参数:
response- 响应filename- 文件名sheetName- Excel sheet 名head- Excel head 头data- 数据列表哦- 抛出:
IOException- 写入失败的情况
-
readExcel
public static <T> List<T> readExcel(org.springframework.web.multipart.MultipartFile file, Class<T> head) throws IOException - 抛出:
IOException
-
readExcel
-
readExcel
-
readExcel
-