public class ExcelTool extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static Byte |
getByteValue(org.apache.poi.ss.usermodel.Row row,
int cellIndex) |
static Date |
getDateValue(org.apache.poi.ss.usermodel.Row row,
int cellIndex) |
static Double |
getDoubleValue(org.apache.poi.ss.usermodel.Row row,
int cellIndex) |
static String |
getFormatDateValue(org.apache.poi.ss.usermodel.Row row,
int cellIndex) |
static String |
getFormatDateValue(org.apache.poi.ss.usermodel.Row row,
int cellIndex,
String pattern) |
static Integer |
getIntegerValue(org.apache.poi.ss.usermodel.Row row,
int cellIndex) |
static Long |
getLongValue(org.apache.poi.ss.usermodel.Row row,
int cellIndex) |
static String |
getStringValue(org.apache.poi.ss.usermodel.Row row,
int cellIndex) |
static <T> List<T> |
parseData(InputStream inputStream,
java.util.function.BiFunction<Integer,org.apache.poi.ss.usermodel.Row,T> function)
解析 excel 中的内容为 list 集合数据
默认解析:
第一个 sheet
跳过第一行数据
|
static <T> List<T> |
parseData(InputStream inputStream,
Class<T> clazz) |
static <T> List<T> |
parseData(String filePath,
java.util.function.BiFunction<Integer,org.apache.poi.ss.usermodel.Row,T> function)
解析 excel 中的内容为 list 集合数据
默认解析:
第一个 sheet
跳过第一行数据
|
static <T> List<T> |
parseData(String filePath,
int sheetIndex,
int skipLineNumbers,
java.util.function.BiFunction<Integer,org.apache.poi.ss.usermodel.Row,T> function)
解析 excel 中的内容为 list 集合数据
|
public static <T> List<T> parseData(String filePath, java.util.function.BiFunction<Integer,org.apache.poi.ss.usermodel.Row,T> function)
T - 返回数据泛型filePath - 文件路径function - 解析接口public static <T> List<T> parseData(InputStream inputStream, java.util.function.BiFunction<Integer,org.apache.poi.ss.usermodel.Row,T> function)
T - 返回数据泛型inputStream - 文件输入流function - 解析接口public static <T> List<T> parseData(InputStream inputStream, Class<T> clazz)
public static <T> List<T> parseData(String filePath, int sheetIndex, int skipLineNumbers, java.util.function.BiFunction<Integer,org.apache.poi.ss.usermodel.Row,T> function)
T - 返回数据泛型filePath - 文件路径sheetIndex - sheet索引skipLineNumbers - 跳过第几行(物理行数)function - 解析接口public static String getStringValue(org.apache.poi.ss.usermodel.Row row, int cellIndex)
public static Byte getByteValue(org.apache.poi.ss.usermodel.Row row, int cellIndex)
public static Long getLongValue(org.apache.poi.ss.usermodel.Row row, int cellIndex)
public static Double getDoubleValue(org.apache.poi.ss.usermodel.Row row, int cellIndex)
public static Integer getIntegerValue(org.apache.poi.ss.usermodel.Row row, int cellIndex)
public static Date getDateValue(org.apache.poi.ss.usermodel.Row row, int cellIndex)
public static String getFormatDateValue(org.apache.poi.ss.usermodel.Row row, int cellIndex)
Copyright © 2021. All rights reserved.