public static class PoijiOptions.PoijiOptionsBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
PoijiOptions.PoijiOptionsBuilder |
addListDelimiter(String delimiter)
Use different delimiter to split the list of items of a cell
|
PoijiOptions |
build() |
PoijiOptions.PoijiOptionsBuilder |
caseInsensitive(boolean caseInsensitive)
Permits case insensitive column names mapping for annotation
ExcelCellName. |
PoijiOptions.PoijiOptionsBuilder |
dateFormatter(DateTimeFormatter dateFormatter)
set a date formatter, default date time formatter is "dd/M/yyyy"
for java.time.LocalDate
|
PoijiOptions.PoijiOptionsBuilder |
dateLenient(boolean dateLenient)
If the simple date format is lenient, use to
set how strict the date formatting must be, defaults to lenient false.
|
PoijiOptions.PoijiOptionsBuilder |
datePattern(String datePattern)
set date pattern, default date format is "dd/M/yyyy" for
java.util.Date
|
PoijiOptions.PoijiOptionsBuilder |
dateRegex(String dateRegex)
Date regex, if would like to specify a regex patter the date must be
in, e.g.\\d{2}/\\d{1}/\\d{4}.
|
PoijiOptions.PoijiOptionsBuilder |
dateTimeFormatter(DateTimeFormatter dateTimeFormatter)
set a date time formatter, default date time formatter is "dd/M/yyyy HH:mm:ss"
for java.time.LocalDateTime
|
PoijiOptions.PoijiOptionsBuilder |
dateTimeRegex(String dateTimeRegex)
DateTime regex, if would like to specify a regex patter the date time must be
in, e.g.\\d{2}/\\d{1}/\\d{4} \\d{2}:\\d{2}:\\d{2}.
|
PoijiOptions.PoijiOptionsBuilder |
disableXLSXNumberCellFormat()
Disable the cell format of all the number cells of an excel file ending with xlsx
|
PoijiOptions.PoijiOptionsBuilder |
headerCount(int headerCount)
This is to set the number of row contains headers
Set 0 to indicate that no header in the excel file. |
PoijiOptions.PoijiOptionsBuilder |
headerStart(int headerStart)
This is to set the row which the unmarshall will
use to start reading header titles, incase the
header is not in row 0.
|
PoijiOptions.PoijiOptionsBuilder |
ignoreHiddenSheets(boolean ignoreHiddenSheets)
Ignore hidden sheets
|
PoijiOptions.PoijiOptionsBuilder |
ignoreWhitespaces(boolean ignoreWhitespaces)
Ignore white space before and after column names for annotation
ExcelCellName. |
PoijiOptions.PoijiOptionsBuilder |
limit(int limit)
limit a number of rows after the header & skipped rows row.
|
PoijiOptions.PoijiOptionsBuilder |
namedHeaderMandatory(boolean namedHeaderMandatory)
Set true if all headers named in
ExcelCellName are mandatory, otherwise false |
PoijiOptions.PoijiOptionsBuilder |
password(String password)
set password for encrypted excel file, Default is null
|
PoijiOptions.PoijiOptionsBuilder |
poijiLogCellFormat(PoijiLogCellFormat cellFormat)
Add cell format option to see each internal cell's excel format for files ending with xlsx format.
|
PoijiOptions.PoijiOptionsBuilder |
poijiNumberFormat(PoijiNumberFormat numberFormat)
Change the default cell formats of a xlsx excel file by overriding
|
PoijiOptions.PoijiOptionsBuilder |
preferNullOverDefault(boolean preferNullOverDefault)
set whether or not to use null instead of default values for Integer,
Double, Float, Long, String and java.util.Date types.
|
PoijiOptions.PoijiOptionsBuilder |
setLocale(Locale locale)
Set the
Locale used by Apache Poi and PoiJ. |
static PoijiOptions.PoijiOptionsBuilder |
settings() |
static PoijiOptions.PoijiOptionsBuilder |
settings(int skip)
Skip a number of rows after the header row.
|
PoijiOptions.PoijiOptionsBuilder |
sheetIndex(int sheetIndex)
set sheet index, default is 0
|
PoijiOptions.PoijiOptionsBuilder |
sheetName(String sheetName)
Set the sheet Name
|
PoijiOptions.PoijiOptionsBuilder |
skip(int skip)
skip a number of rows after the header row.
|
PoijiOptions.PoijiOptionsBuilder |
trimCellValue(boolean trimCellValue)
Trim cell value
|
PoijiOptions.PoijiOptionsBuilder |
withCasting(Casting casting)
Use a custom casting implementation
|
PoijiOptions.PoijiOptionsBuilder |
withFormatting(Formatting formatting)
Use a custom excel header format implementation
|
public static PoijiOptions.PoijiOptionsBuilder settings(int skip)
skip - ignored row number after the header rowpublic static PoijiOptions.PoijiOptionsBuilder settings()
public PoijiOptions.PoijiOptionsBuilder dateFormatter(DateTimeFormatter dateFormatter)
dateFormatter - date time formatterpublic PoijiOptions.PoijiOptionsBuilder dateTimeFormatter(DateTimeFormatter dateTimeFormatter)
dateTimeFormatter - date time formatterpublic PoijiOptions.PoijiOptionsBuilder datePattern(String datePattern)
datePattern - date time formatterpublic PoijiOptions.PoijiOptionsBuilder preferNullOverDefault(boolean preferNullOverDefault)
preferNullOverDefault - booleanpublic PoijiOptions.PoijiOptionsBuilder setLocale(Locale locale)
Locale used by Apache Poi and PoiJ. Default is Locale.ENGLISH.
This setting is only used by Apache Poi thread and PoiJ. See LocaleUtil
for more details.locale - Localepublic PoijiOptions build()
public PoijiOptions.PoijiOptionsBuilder sheetIndex(int sheetIndex)
sheetIndex - numberpublic PoijiOptions.PoijiOptionsBuilder sheetName(String sheetName)
sheetName - excel sheet namepublic PoijiOptions.PoijiOptionsBuilder skip(int skip)
skip - numberpublic PoijiOptions.PoijiOptionsBuilder limit(int limit)
limit - numberpublic PoijiOptions.PoijiOptionsBuilder password(String password)
password - excel passwordpublic PoijiOptions.PoijiOptionsBuilder ignoreHiddenSheets(boolean ignoreHiddenSheets)
ignoreHiddenSheets - whether or not to ignore any hidden sheets
in the work book.public PoijiOptions.PoijiOptionsBuilder trimCellValue(boolean trimCellValue)
trimCellValue - trim the cell value before processing work book.public PoijiOptions.PoijiOptionsBuilder dateRegex(String dateRegex)
dateRegex - date regex patternpublic PoijiOptions.PoijiOptionsBuilder dateTimeRegex(String dateTimeRegex)
dateTimeRegex - date regex patternpublic PoijiOptions.PoijiOptionsBuilder dateLenient(boolean dateLenient)
dateLenient - true or falsepublic PoijiOptions.PoijiOptionsBuilder withCasting(Casting casting)
casting - custom casting implementationpublic PoijiOptions.PoijiOptionsBuilder headerStart(int headerStart)
headerStart - an index number of the excel header to start reading headerpublic PoijiOptions.PoijiOptionsBuilder headerCount(int headerCount)
headerCount - an index number of the excel header to start reading headerpublic PoijiOptions.PoijiOptionsBuilder caseInsensitive(boolean caseInsensitive)
ExcelCellName.
Default - false.caseInsensitive - true or falsepublic PoijiOptions.PoijiOptionsBuilder ignoreWhitespaces(boolean ignoreWhitespaces)
ExcelCellName.
Default - false.ignoreWhitespaces - true or falsepublic PoijiOptions.PoijiOptionsBuilder poijiLogCellFormat(PoijiLogCellFormat cellFormat)
cellFormat - poiji cell format instancepublic PoijiOptions.PoijiOptionsBuilder poijiNumberFormat(PoijiNumberFormat numberFormat)
numberFormat - poiji number format instancepublic PoijiOptions.PoijiOptionsBuilder namedHeaderMandatory(boolean namedHeaderMandatory)
ExcelCellName are mandatory, otherwise falsenamedHeaderMandatory - fieldas are mandatory or notpublic PoijiOptions.PoijiOptionsBuilder disableXLSXNumberCellFormat()
public PoijiOptions.PoijiOptionsBuilder addListDelimiter(String delimiter)
delimiter - by default delimiter is ','public PoijiOptions.PoijiOptionsBuilder withFormatting(Formatting formatting)
formatting - custom header format implementationCopyright © 2017–2020. All rights reserved.