public interface Cell
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getColumnIndex()
当前单元格所在列号,从0开始
|
long |
getRowIndex()
当前单元格所在行号,从0开始
|
CellDataType |
getType()
单元格数据类型
|
boolean |
isEndOfRow()
当前单元格是否为当前行的最后一列
|
static Cell |
of(int row,
int column,
boolean endOfRow,
Object value)
创建一个简单的单元格对象,通常用于自定义写入时使用
|
static Cell |
of(int row,
int column,
boolean endOfRow,
Object value,
CellDataType type)
创建一个指定类型的简单的单元格对象,通常用于自定义写入时使用
|
static Cell |
of(int row,
int column,
Object value)
创建一个简单的单元格对象,通常用于自定义写入时使用
|
Optional<Object> |
value()
获取单元格的值,如果值为
null则返回Optional.empty() |
default Optional<String> |
valueAsText()
将单元格的值转为文本
|
long getRowIndex()
int getColumnIndex()
boolean isEndOfRow()
Optional<Object> value()
null则返回Optional.empty()CellDataType getType()
static Cell of(int row, int column, Object value)
row - 行号column - 列号value - 单元格的值static Cell of(int row, int column, boolean endOfRow, Object value)
row - 行号column - 列号endOfRow - 是否为最后一列value - 单元格的值static Cell of(int row, int column, boolean endOfRow, Object value, CellDataType type)
row - 行号column - 列号endOfRow - 是否为最后一列value - 单元格的值type - 类型Copyright © 2020–2022. All rights reserved.