public class EasyExcelUtil extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
EasyExcelUtil.CommonExcelListener<T>
模型 解析监听器
|
static class |
EasyExcelUtil.ModelExcelListener
模型 解析监听器
|
private static class |
EasyExcelUtil.StringExcelListener
StringList 解析监听器
|
| 构造器和说明 |
|---|
EasyExcelUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
isExcelFile(String fileName) |
static List<Map<Integer,String>> |
readExcelAsStringList(InputStream inputStream,
String sheetName)
使用 StringList 来读取Excel
列号 : value(列号从0开始)
|
static <T> List<T> |
readExcelFromInputStream(InputStream inputStream,
Class<T> clazz,
int headRowNumber) |
static List<Object> |
readExcelFromLocalFilePath(String filePath,
Class<? extends com.alibaba.excel.metadata.BaseRowModel> clazz,
int headRowNumber)
通过文件名直接读取excel
|
static List<Object> |
readExcelFromMultipartFile(org.springframework.web.multipart.MultipartFile multipartFile,
Class<? extends com.alibaba.excel.metadata.BaseRowModel> clazz,
int headRowNumber)
从web上读取excel
|
static List<Object> |
readExcelWithModel(InputStream inputStream,
Class<? extends com.alibaba.excel.metadata.BaseRowModel> clazz,
com.alibaba.excel.support.ExcelTypeEnum excelTypeEnum,
int sheetNo,
int headLineMun)
已过时。
|
static <T> List<T> |
readExcelWithSheetName(InputStream inputStream,
Class<T> clazz,
String sheetName) |
public static List<Map<Integer,String>> readExcelAsStringList(InputStream inputStream, String sheetName)
inputStream - Excel的输入流@Deprecated public static List<Object> readExcelWithModel(InputStream inputStream, Class<? extends com.alibaba.excel.metadata.BaseRowModel> clazz, com.alibaba.excel.support.ExcelTypeEnum excelTypeEnum, int sheetNo, int headLineMun) throws IOException
inputStream - clazz - excelTypeEnum - IOExceptionpublic static <T> List<T> readExcelWithSheetName(InputStream inputStream, Class<T> clazz, String sheetName) throws IOException
IOExceptionpublic static List<Object> readExcelFromLocalFilePath(String filePath, Class<? extends com.alibaba.excel.metadata.BaseRowModel> clazz, int headRowNumber)
filePath - headRowNumber - public static <T> List<T> readExcelFromInputStream(InputStream inputStream, Class<T> clazz, int headRowNumber) throws IOException
IOExceptionpublic static List<Object> readExcelFromMultipartFile(org.springframework.web.multipart.MultipartFile multipartFile, Class<? extends com.alibaba.excel.metadata.BaseRowModel> clazz, int headRowNumber) throws IOException
multipartFile - headRowNumber - IOExceptionpublic static boolean isExcelFile(String fileName)
Copyright © 2021. All rights reserved.