Class PoiXssfSaxProvider
java.lang.Object
com.northconcepts.datapipeline.excel.PoiXssfSaxProvider
- All Implemented Interfaces:
DataExceptionContributor
Provider for
ExcelDocument.ProviderType.POI_XSSF_SAX: opens .xlsx files read-only and only from a
File; new workbooks are written as with ExcelDocument.ProviderType.POI_XSSF.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExcelFieldMetadataprotected static final intprotected org.apache.poi.ss.usermodel.Sheetprotected org.apache.poi.ss.usermodel.Workbook -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExceptionProperties(DataException exception) Adds this object's current state to aDataException.voidclose()final voidprotected voidvoidfinal voidprotected voidprotected org.apache.poi.common.usermodel.HyperlinkTypeintgetCellCount(int rowIndex) protected ExcelColorReturns default font color for XLSX file type.protected ExcelReaderprotected ExcelWriterintintString[]protected voidinit()voidbooleanbooleanbooleanbooleanbooleanvoidvoidopenWorkbook(File file) voidopenWorkbook(InputStream inputStream) protected ExcelColorreadBackgroundColor(org.apache.poi.ss.usermodel.CellStyle style) protected voidreadExcelHyperlink(org.apache.poi.ss.usermodel.Cell cell, Field field) protected voidreadExcelStyle(org.apache.poi.ss.usermodel.Workbook workbook, org.apache.poi.ss.usermodel.Cell cell, Field field) voidprotected ExcelColorreadFontColor(org.apache.poi.ss.usermodel.Font font) voidsaveWorkbook(File file) voidsaveWorkbook(OutputStream outputStream) voidsetAutoFilter(int firstRow, int firstColumn) voidsetAutofitColumns(int firstColumnIndex, int[] columnCharacterCount) com.northconcepts.datapipeline.excel.ProvidersetEvaluateExpressions(boolean evaluateExpressions) protected voidsetExcelReader(ExcelReader excelReader) protected voidsetExcelWriter(ExcelWriter excelWriter) protected voidprotected voidsetFreezePaneImpl(int columns, int rows) final voidstartReading(int sheetIndex) final voidstartReading(String sheetName) protected voidstartReadingImpl(int sheetIndex) protected voidstartReadingImpl(String sheetName) voidstartRecord(Record record, int currentRowIndex) final voidstartWriting(String sheetName, int sheetIndex) protected voidstartWritingImpl(String sheetName, int sheetIndex) protected ExcelHyperlinkTypetoExcelHyperlinkType(org.apache.poi.common.usermodel.HyperlinkType type) protected voidwriteCellStyle(org.apache.poi.ss.usermodel.Workbook workbook, org.apache.poi.ss.usermodel.DataFormat format, org.apache.poi.ss.usermodel.Cell cell, Field field) voidwriteField(int rowIndex, int columnIndex, int recordndex, int fieldIndex, Field field) protected voidwriteHyperlink(org.apache.poi.ss.usermodel.CreationHelper helper, org.apache.poi.ss.usermodel.Cell cell, Field field) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionProperties, exception, exception, exception
-
Field Details
-
JAN_1_1970
protected static final int JAN_1_1970- See Also:
-
workbook
protected org.apache.poi.ss.usermodel.Workbook workbook -
sheet
protected org.apache.poi.ss.usermodel.Sheet sheet -
fieldMetadata
-
-
Constructor Details
-
PoiXssfSaxProvider
public PoiXssfSaxProvider()
-
-
Method Details
-
openWorkbook
- Throws:
Throwable
-
openWorkbook
-
init
protected void init() -
newWorkbook
public void newWorkbook() -
setAutoFilter
public void setAutoFilter(int firstRow, int firstColumn) -
close
public void close() -
isFreezePaneSupported
public boolean isFreezePaneSupported() -
isHyperlinkSupported
public boolean isHyperlinkSupported() -
isCellStyleSupported
public boolean isCellStyleSupported() -
saveWorkbook
-
startReadingImpl
-
startReadingImpl
protected void startReadingImpl(int sheetIndex) -
readField
-
endReadingImpl
protected void endReadingImpl() -
startWritingImpl
-
setFreezePaneImpl
protected void setFreezePaneImpl(int columns, int rows) -
writeField
-
setAutofitColumns
public void setAutofitColumns(int firstColumnIndex, int[] columnCharacterCount) -
endWritingImpl
protected void endWritingImpl() -
getCellCount
public int getCellCount(int rowIndex) -
getLastRowIndex
public int getLastRowIndex() -
getLastColumnIndex
public int getLastColumnIndex() -
getSheetNames
-
readExcelHyperlink
-
readExcelStyle
protected void readExcelStyle(org.apache.poi.ss.usermodel.Workbook workbook, org.apache.poi.ss.usermodel.Cell cell, Field field) -
getDefaultFontColor
Returns default font color for XLSX file type. -
readFontColor
-
readBackgroundColor
-
writeHyperlink
protected void writeHyperlink(org.apache.poi.ss.usermodel.CreationHelper helper, org.apache.poi.ss.usermodel.Cell cell, Field field) -
toExcelHyperlinkType
protected ExcelHyperlinkType toExcelHyperlinkType(org.apache.poi.common.usermodel.HyperlinkType type) -
fromExcelHyperlinkType
protected org.apache.poi.common.usermodel.HyperlinkType fromExcelHyperlinkType(ExcelHyperlinkType type) -
writeCellStyle
protected void writeCellStyle(org.apache.poi.ss.usermodel.Workbook workbook, org.apache.poi.ss.usermodel.DataFormat format, org.apache.poi.ss.usermodel.Cell cell, Field field) -
addExceptionProperties
Description copied from interface:DataExceptionContributorAdds this object's current state to aDataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.- Specified by:
addExceptionPropertiesin interfaceDataExceptionContributor
-
isEvaluateExpressions
public boolean isEvaluateExpressions() -
setEvaluateExpressions
public com.northconcepts.datapipeline.excel.Provider setEvaluateExpressions(boolean evaluateExpressions) -
saveWorkbook
- Throws:
Throwable
-
startReading
-
startReading
public final void startReading(int sheetIndex) -
endReading
public final void endReading() -
startWriting
-
endWriting
public final void endWriting() -
setFreezePane
protected void setFreezePane() -
startRecord
-
endRecord
-
isDataFormatSupported
public boolean isDataFormatSupported() -
setExcelReader
-
getExcelReader
-
setExcelWriter
-
getExcelWriter
-
initStyles
public void initStyles()
-