public abstract class ExcelCellUtils extends Object
| 构造器和说明 |
|---|
ExcelCellUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addChangeFun(Class<?> classFrom,
Class<?> classTo,
Function<Object,Object> fun)
添加值类型转换的函数
|
static Object |
getCellValue(org.apache.poi.ss.usermodel.Cell cell)
获取单元格的值
|
static Object |
getCellValue(org.apache.poi.ss.usermodel.Cell cell,
ExcelCellMapping cellMapping)
获取单元格的值
|
static boolean |
isEmptyCell(org.apache.poi.ss.usermodel.Cell cell)
判断是否为空单元格
|
static void |
setCellStyle(org.apache.poi.ss.usermodel.Sheet sheet,
ExcelMapping mapping,
boolean isBeforeWriteFile)
设置列样式
|
static void |
setCellValue(org.apache.poi.ss.usermodel.Cell cell,
Object data,
ExcelCellMapping cellMapping)
设置单元格的值
|
public static void addChangeFun(Class<?> classFrom, Class<?> classTo, Function<Object,Object> fun)
classFrom - 原类型classTo - 目标类型fun - 函数public static boolean isEmptyCell(org.apache.poi.ss.usermodel.Cell cell)
cell - 单元格public static Object getCellValue(org.apache.poi.ss.usermodel.Cell cell)
cell - 单元格public static Object getCellValue(org.apache.poi.ss.usermodel.Cell cell, ExcelCellMapping cellMapping)
cell - 单元格cellMapping - 列映射public static void setCellValue(org.apache.poi.ss.usermodel.Cell cell,
Object data,
ExcelCellMapping cellMapping)
throws NoSuchFieldException
cell - 单元格data - 数据cellMapping - 列映射NoSuchFieldException - 字段未找到的异常public static void setCellStyle(org.apache.poi.ss.usermodel.Sheet sheet,
ExcelMapping mapping,
boolean isBeforeWriteFile)
sheet - 表格mapping - 表格映射isBeforeWriteFile - 是否在写文件前Copyright © 2021 EasyJ寮�婧愮ぞ鍖�. All rights reserved.