| Package | Description |
|---|---|
| org.aoju.bus.office.support.excel | |
| org.aoju.bus.office.support.excel.editors |
| Modifier and Type | Method and Description |
|---|---|
static Object |
CellUtils.getCellValue(org.apache.poi.ss.usermodel.Cell cell,
CellEditor cellEditor)
获取单元格值
|
static Object |
CellUtils.getCellValue(org.apache.poi.ss.usermodel.Cell cell,
org.apache.poi.ss.usermodel.CellType cellType,
CellEditor cellEditor)
获取单元格值
如果单元格值为数字格式,则判断其格式中是否有小数部分,无则返回Long类型,否则返回Double类型
|
static List<Object> |
RowUtils.readRow(org.apache.poi.ss.usermodel.Row row,
CellEditor cellEditor)
读取一行
|
ExcelReader |
ExcelReader.setCellEditor(CellEditor cellEditor)
设置单元格值处理逻辑
当Excel中的值并不能满足我们的读取要求时,通过传入一个编辑接口,可以对单元格值自定义,例如对数字和日期类型值转换为字符串等
|
| Modifier and Type | Class and Description |
|---|---|
class |
NumericToIntEditor
POI中NUMRIC类型的值默认返回的是Double类型,此编辑器用于转换其为int型
|
class |
TrimEditor
去除String类型的单元格值两边的空格
|
Copyright © 2020. All rights reserved.