Class UploadToRowColExcel

java.lang.Object
de.businesscode.bcdui.upload.data.steps.UploadToRowColExcel
All Implemented Interfaces:
org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler

public class UploadToRowColExcel extends Object implements org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler
Responsible to read an Excel xlsx file from a BLOB and write it row and cell to bcd_dataupload_rowcol
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Locale
     
    static final String
     
    static final char
     
    protected final UploadControl
     
    protected final UploadToRowCol
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cell(String cellReference, String formattedValue, org.apache.poi.xssf.usermodel.XSSFComment comment)
    Callback for a detected cell Skipped cells will be added,
    void
    endRow(int rowNum)
    Callback for row finish
    void
    headerFooter(String text, boolean isHeader, String tagName)
     
    void
    Open the file with the given uploadId, split it into rows and cells and write it to bcd_dataupload_staging
    void
    process(org.apache.poi.openxml4j.opc.OPCPackage xlsxPackage)
    Processes whole workbook, currently only the first sheet is read
    void
    processSheet(org.apache.poi.xssf.model.StylesTable styles, org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable strings, org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler sheetHandler, InputStream sheetInputStream)
    Process a single sheet.
    void
    startRow(int rowNum)
    New Row

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler

    endSheet
  • Field Details

  • Constructor Details

  • Method Details

    • process

      public void process() throws Exception
      Open the file with the given uploadId, split it into rows and cells and write it to bcd_dataupload_staging
      Throws:
      Exception
    • startRow

      public void startRow(int rowNum) throws RuntimeException
      New Row
      Specified by:
      startRow in interface org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler
      Throws:
      RuntimeException
    • endRow

      public void endRow(int rowNum) throws RuntimeException
      Callback for row finish
      Specified by:
      endRow in interface org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler
      Throws:
      RuntimeException
    • cell

      public void cell(String cellReference, String formattedValue, org.apache.poi.xssf.usermodel.XSSFComment comment) throws RuntimeException
      Callback for a detected cell Skipped cells will be added,
      Specified by:
      cell in interface org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler
      Throws:
      RuntimeException
    • headerFooter

      public void headerFooter(String text, boolean isHeader, String tagName)
      Specified by:
      headerFooter in interface org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler
    • process

      public void process(org.apache.poi.openxml4j.opc.OPCPackage xlsxPackage) throws IOException, org.apache.poi.openxml4j.exceptions.OpenXML4JException, SAXException, ParserConfigurationException
      Processes whole workbook, currently only the first sheet is read
      Parameters:
      xlsxPackage -
      Throws:
      IOException
      org.apache.poi.openxml4j.exceptions.OpenXML4JException
      SAXException
      ParserConfigurationException
    • processSheet

      public void processSheet(org.apache.poi.xssf.model.StylesTable styles, org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable strings, org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler sheetHandler, InputStream sheetInputStream) throws IOException, SAXException, ParserConfigurationException
      Process a single sheet. Currently all data of the sheet is read TODO handle merged cells
      Parameters:
      styles -
      strings -
      sheetHandler -
      sheetInputStream -
      Throws:
      IOException
      SAXException
      ParserConfigurationException