Enum Class ExcelReadPolicy
- 所有已实现的接口:
Serializable,Comparable<ExcelReadPolicy>,Constable
读取Excel的功能可配置特性
-
嵌套类概要
嵌套类从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
枚举常量概要
枚举常量枚举常量说明判断数字为日期类型将转换为日期格式精确绑定属性 指定此特性,在按行读取时,若没有指定列名,将不会绑定对象属性 否则将按照实体字段顺序自动按照索引绑定数据如果字段存在值覆盖掉原值忽略空sheet的错误忽略空表头的错误空行也视为有效数据 读取时将转换为一个空对象读取的sheet数据按顺序排列 在使用Map接收时,使用LinkedHashMap将合并的单元格展开到合并单元格的各个单元格修整单元格去掉单元格所有的空格和换行符使用Map接收数据时,打印调试信息读取数据后校验数据 -
方法概要
修饰符和类型方法说明boolean获取策略的值static ExcelReadPolicyReturns the enum constant of this class with the specified name.static ExcelReadPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
枚举常量详细资料
-
IGNORE_EMPTY_SHEET_ERROR
忽略空sheet的错误
空sheet将返回null
-
IGNORE_EMPTY_SHEET_HEADER_ERROR
忽略空表头的错误
若取消此项配置,在没有读取到指定表头时,将抛出异常
-
SPREAD_MERGING_REGION
将合并的单元格展开到合并单元格的各个单元格
配置此策略,可以随意指定合并单元格的位置而读取到值
不配置此策略将只能获取合并单元格中左上角单元格才能获取到单元格值
-
INCLUDE_EMPTY_ROW
空行也视为有效数据 读取时将转换为一个空对象- 从以下版本开始:
- 0.0.5-ALPHA 将该策略默认关闭
-
SORTED_READ_SHEET_DATA
读取的sheet数据按顺序排列 在使用Map接收时,使用LinkedHashMap -
CAST_NUMBER_TO_DATE
判断数字为日期类型将转换为日期格式 -
DATA_BIND_PRECISE_LOCALIZATION
精确绑定属性 指定此特性,在按行读取时,若没有指定列名,将不会绑定对象属性 否则将按照实体字段顺序自动按照索引绑定数据 -
TRIM_CELL_VALUE
修整单元格去掉单元格所有的空格和换行符 -
USE_MAP_DEBUG
使用Map接收数据时,打印调试信息 -
FIELD_EXIST_OVERRIDE
如果字段存在值覆盖掉原值 -
VALIDATE_READ_ROW_DATA
读取数据后校验数据
-
-
方法详细资料
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- 返回:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- 如果参数为空值
-
getPolicyAsBoolean
public boolean getPolicyAsBoolean()获取策略的值- 返回:
- 布尔类型的策略
-