Enum Class ExcelReadPolicy

java.lang.Object
java.lang.Enum<ExcelReadPolicy>
cn.toutatis.xvoid.axolotl.excel.reader.constant.ExcelReadPolicy
所有已实现的接口:
Serializable, Comparable<ExcelReadPolicy>, Constable

public enum ExcelReadPolicy extends Enum<ExcelReadPolicy>
读取Excel的功能可配置特性
  • 枚举常量详细资料

    • IGNORE_EMPTY_SHEET_ERROR

      public static final ExcelReadPolicy IGNORE_EMPTY_SHEET_ERROR

      忽略空sheet的错误

      空sheet将返回null

    • IGNORE_EMPTY_SHEET_HEADER_ERROR

      public static final ExcelReadPolicy IGNORE_EMPTY_SHEET_HEADER_ERROR

      忽略空表头的错误

      若取消此项配置,在没有读取到指定表头时,将抛出异常

    • SPREAD_MERGING_REGION

      public static final ExcelReadPolicy SPREAD_MERGING_REGION

      将合并的单元格展开到合并单元格的各个单元格

      配置此策略,可以随意指定合并单元格的位置而读取到值

      不配置此策略将只能获取合并单元格中左上角单元格才能获取到单元格值

    • INCLUDE_EMPTY_ROW

      public static final ExcelReadPolicy INCLUDE_EMPTY_ROW
      空行也视为有效数据 读取时将转换为一个空对象
      从以下版本开始:
      0.0.5-ALPHA 将该策略默认关闭
    • SORTED_READ_SHEET_DATA

      public static final ExcelReadPolicy SORTED_READ_SHEET_DATA
      读取的sheet数据按顺序排列 在使用Map接收时,使用LinkedHashMap
    • CAST_NUMBER_TO_DATE

      public static final ExcelReadPolicy CAST_NUMBER_TO_DATE
      判断数字为日期类型将转换为日期格式
    • DATA_BIND_PRECISE_LOCALIZATION

      public static final ExcelReadPolicy DATA_BIND_PRECISE_LOCALIZATION
      精确绑定属性 指定此特性,在按行读取时,若没有指定列名,将不会绑定对象属性 否则将按照实体字段顺序自动按照索引绑定数据
    • TRIM_CELL_VALUE

      public static final ExcelReadPolicy TRIM_CELL_VALUE
      修整单元格去掉单元格所有的空格和换行符
    • USE_MAP_DEBUG

      public static final ExcelReadPolicy USE_MAP_DEBUG
      使用Map接收数据时,打印调试信息
    • FIELD_EXIST_OVERRIDE

      public static final ExcelReadPolicy FIELD_EXIST_OVERRIDE
      如果字段存在值覆盖掉原值
    • VALIDATE_READ_ROW_DATA

      public static final ExcelReadPolicy VALIDATE_READ_ROW_DATA
      读取数据后校验数据
  • 方法详细资料

    • values

      public static ExcelReadPolicy[] 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

      public static ExcelReadPolicy valueOf(String name)
      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 name
      NullPointerException - 如果参数为空值
    • getPolicyAsBoolean

      public boolean getPolicyAsBoolean()
      获取策略的值
      返回:
      布尔类型的策略