Class PoiXssfSaxProvider

java.lang.Object
com.northconcepts.datapipeline.excel.PoiXssfSaxProvider
All Implemented Interfaces:
DataExceptionContributor

public class PoiXssfSaxProvider extends Object
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 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

      protected ExcelFieldMetadata fieldMetadata
  • Constructor Details

    • PoiXssfSaxProvider

      public PoiXssfSaxProvider()
  • Method Details

    • openWorkbook

      public void openWorkbook(File file) throws Throwable
      Throws:
      Throwable
    • openWorkbook

      public void openWorkbook(InputStream inputStream)
    • 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

      public void saveWorkbook(OutputStream outputStream)
    • startReadingImpl

      protected void startReadingImpl(String sheetName)
    • startReadingImpl

      protected void startReadingImpl(int sheetIndex)
    • readField

      public void readField(int rowIndex, int fieldIndex, Field field)
    • endReadingImpl

      protected void endReadingImpl()
    • startWritingImpl

      protected void startWritingImpl(String sheetName, int sheetIndex)
    • setFreezePaneImpl

      protected void setFreezePaneImpl(int columns, int rows)
    • writeField

      public void writeField(int rowIndex, int columnIndex, int recordndex, int fieldIndex, Field field)
    • 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

      public String[] getSheetNames()
    • readExcelHyperlink

      protected void readExcelHyperlink(org.apache.poi.ss.usermodel.Cell cell, Field field)
    • readExcelStyle

      protected void readExcelStyle(org.apache.poi.ss.usermodel.Workbook workbook, org.apache.poi.ss.usermodel.Cell cell, Field field)
    • getDefaultFontColor

      protected ExcelColor getDefaultFontColor()
      Returns default font color for XLSX file type.
    • readFontColor

      protected ExcelColor readFontColor(org.apache.poi.ss.usermodel.Font font)
    • readBackgroundColor

      protected ExcelColor readBackgroundColor(org.apache.poi.ss.usermodel.CellStyle style)
    • 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

      public DataException addExceptionProperties(DataException exception)
      Description copied from interface: DataExceptionContributor
      Adds this object's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.
      Specified by:
      addExceptionProperties in interface DataExceptionContributor
    • isEvaluateExpressions

      public boolean isEvaluateExpressions()
    • setEvaluateExpressions

      public com.northconcepts.datapipeline.excel.Provider setEvaluateExpressions(boolean evaluateExpressions)
    • saveWorkbook

      public void saveWorkbook(File file) throws Throwable
      Throws:
      Throwable
    • startReading

      public final void startReading(String sheetName)
    • startReading

      public final void startReading(int sheetIndex)
    • endReading

      public final void endReading()
    • startWriting

      public final void startWriting(String sheetName, int sheetIndex)
    • endWriting

      public final void endWriting()
    • setFreezePane

      protected void setFreezePane()
    • startRecord

      public void startRecord(Record record, int currentRowIndex)
    • endRecord

      public void endRecord(Record record, int currentRowIndex)
    • isDataFormatSupported

      public boolean isDataFormatSupported()
    • setExcelReader

      protected void setExcelReader(ExcelReader excelReader)
    • getExcelReader

      protected ExcelReader getExcelReader()
    • setExcelWriter

      protected void setExcelWriter(ExcelWriter excelWriter)
    • getExcelWriter

      protected ExcelWriter getExcelWriter()
    • initStyles

      public void initStyles()