Interface SimpleHeaderExtractor

All Superinterfaces:
HeaderExtractor, Serializable

@Immutable public interface SimpleHeaderExtractor extends HeaderExtractor
A HeaderExtractor appropriate for extracting a single-row header.

The location of the header can be static or dynamic. Merged cells are supported; merged cells will be treated as signifying multiple columns with the same name, which will ultimately become column_name, column_name_2 in the final ParseResult.

  • Method Details

    • rowsToSkip

      @Default default Integer rowsToSkip()
      A static number of rows at the top of the sheet to ignore. Default value is 0.
    • predicate

      @Default default RowPredicate predicate()
      After skipping rowsToSkip(), the first subsequent row for which this function returns true will be treated as the header.

      Passing a custom function here is convenient for files for which there are a variable number of rows that need to be skipped before the header and there is some logic to identify whether a given row is the header or not. The default behavior if no custom function is passed is to always return true.

    • caseNormalizationOption

      @Default default CaseNormalizationOption caseNormalizationOption()
    • extractHeader

      default Optional<Header> extractHeader(org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      extractHeader in interface HeaderExtractor
    • builder

      Create a builder for constructing an instance of this class.