public class ExcelUtil extends Object
| Constructor and Description |
|---|
ExcelUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Boolean |
isExcel(String fileName)
是否是excel文件
|
static List<Map<String,String>> |
readExcel(InputStream inputStream,
String sheetName)
读取excel 默认第一行为表头
|
static List<Map<String,String>> |
readExcel(String filePath)
读取excel 默认第一行为表头
|
static List<String> |
readExcelColumn(InputStream inputStream,
String sheetName)
读取excel表头
|
static List<String> |
readExcelColumn(String filePath)
读取excel表头
|
static List<List<String>> |
readExcelDataList(InputStream inputStream,
String sheetName)
读取excel所有行
|
static List<List<String>> |
readExcelDataList(String filePath)
读取excel所有行
|
static List<String> |
readExcelSheets(InputStream inputStream)
读取Excel的Sheet列表
|
static List<String> |
readExcelSheets(String filePath)
读取Excel的Sheet列表
|
static void |
registerConverter()
注册类型转换器
|
static void |
writeAppendExcel(List<List<Object>> datas,
String filePath) |
static void |
writeExcel(List<List<Object>> datas,
OutputStream outputStream)
写入excel数据流
|
static void |
writeExcel(List<List<Object>> datas,
String filePath) |
public static void registerConverter()
public static List<Map<String,String>> readExcel(String filePath)
filePath - public static List<List<String>> readExcelDataList(String filePath)
filePath - public static List<Map<String,String>> readExcel(InputStream inputStream, String sheetName)
inputStream - sheetName - public static List<List<String>> readExcelDataList(InputStream inputStream, String sheetName)
inputStream - sheetName - public static List<String> readExcelSheets(InputStream inputStream)
inputStream - public static List<String> readExcelColumn(String filePath)
filePath - public static List<String> readExcelColumn(InputStream inputStream, String sheetName)
inputStream - sheetName - public static void writeExcel(List<List<Object>> datas, OutputStream outputStream)
datas - outputStream - Copyright © 2025. All rights reserved.