public class ExcelReaderBuilder extends AbstractExcelReaderParameterBuilder<ExcelReaderBuilder,ReadWorkbook>
构造器和说明 |
---|
ExcelReaderBuilder() |
限定符和类型 | 方法和说明 |
---|---|
ExcelReaderBuilder |
autoCloseStream(Boolean autoCloseStream)
Default true
|
ExcelReader |
build() |
ExcelReaderBuilder |
customObject(Object customObject)
This object can be read in the Listener
ReadListener.invoke(Object, AnalysisContext)
AnalysisContext.getCustom() |
void |
doReadAll() |
<T> List<T> |
doReadAllSync()
Synchronous reads return results
|
ExcelReaderBuilder |
excelType(ExcelTypeEnum excelType) |
ExcelReaderBuilder |
extraRead(CellExtraTypeEnum extraType)
Read some extra information, not by default
|
ExcelReaderBuilder |
file(File file)
Read file
If 'inputStream' and 'file' all not empty,file first
|
ExcelReaderBuilder |
file(InputStream inputStream)
Read InputStream
If 'inputStream' and 'file' all not empty,file first
|
ExcelReaderBuilder |
file(String pathName)
Read file
If 'inputStream' and 'file' all not empty,file first
|
ExcelReaderBuilder |
ignoreEmptyRow(Boolean ignoreEmptyRow)
Ignore empty rows.Default is true.
|
ExcelReaderBuilder |
mandatoryUseInputStream(Boolean mandatoryUseInputStream)
Mandatory use 'inputStream' .Default is false.
|
protected ReadWorkbook |
parameter()
Get parameter
|
ExcelReaderBuilder |
password(String password)
Whether the encryption
|
ExcelReaderBuilder |
readCache(ReadCache readCache)
A cache that stores temp data to save memory.
|
ExcelReaderBuilder |
readCacheSelector(ReadCacheSelector readCacheSelector)
Select the cache.Default use
SimpleReadCacheSelector |
ExcelReaderSheetBuilder |
sheet() |
ExcelReaderSheetBuilder |
sheet(Integer sheetNo) |
ExcelReaderSheetBuilder |
sheet(Integer sheetNo,
String sheetName) |
ExcelReaderSheetBuilder |
sheet(String sheetName) |
ExcelReaderBuilder |
useDefaultListener(Boolean useDefaultListener)
Whether to use the default listener, which is used by default.
|
ExcelReaderBuilder |
xlsxSAXParserFactoryName(String xlsxSAXParserFactoryName)
SAXParserFactory used when reading xlsx.
|
headRowNumber, registerReadListener, useScientificFormat
autoTrim, head, head, locale, registerConverter, self, use1904windowing
public ExcelReaderBuilder excelType(ExcelTypeEnum excelType)
public ExcelReaderBuilder file(InputStream inputStream)
If 'inputStream' and 'file' all not empty,file first
public ExcelReaderBuilder file(File file)
If 'inputStream' and 'file' all not empty,file first
public ExcelReaderBuilder file(String pathName)
If 'inputStream' and 'file' all not empty,file first
public ExcelReaderBuilder mandatoryUseInputStream(Boolean mandatoryUseInputStream)
if false,Will transfer 'inputStream' to temporary files to improve efficiency
public ExcelReaderBuilder autoCloseStream(Boolean autoCloseStream)
autoCloseStream
- public ExcelReaderBuilder ignoreEmptyRow(Boolean ignoreEmptyRow)
ignoreEmptyRow
- public ExcelReaderBuilder customObject(Object customObject)
ReadListener.invoke(Object, AnalysisContext)
AnalysisContext.getCustom()
customObject
- public ExcelReaderBuilder readCache(ReadCache readCache)
readCache
- public ExcelReaderBuilder readCacheSelector(ReadCacheSelector readCacheSelector)
SimpleReadCacheSelector
readCacheSelector
- public ExcelReaderBuilder password(String password)
password
- public ExcelReaderBuilder xlsxSAXParserFactoryName(String xlsxSAXParserFactoryName)
The default will automatically find.
Please pass in the name of a class ,like : "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"
xlsxSAXParserFactoryName
- SAXParserFactory.newInstance()
,
SAXParserFactory.newInstance(String, ClassLoader)
public ExcelReaderBuilder extraRead(CellExtraTypeEnum extraType)
extraType
- extra information typepublic ExcelReaderBuilder useDefaultListener(Boolean useDefaultListener)
The ModelBuildEventListener
is loaded by default to convert the object.
useDefaultListener
- public ExcelReader build()
public void doReadAll()
public <T> List<T> doReadAllSync()
public ExcelReaderSheetBuilder sheet()
public ExcelReaderSheetBuilder sheet(Integer sheetNo)
public ExcelReaderSheetBuilder sheet(String sheetName)
public ExcelReaderSheetBuilder sheet(Integer sheetNo, String sheetName)
protected ReadWorkbook parameter()
AbstractParameterBuilder
parameter
在类中 AbstractParameterBuilder<ExcelReaderBuilder,ReadWorkbook>
Copyright © 2018–2021 Alibaba Group. All rights reserved.