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
FieldsModifier and TypeFieldDescriptionstatic final Localestatic final Stringstatic final charprotected final UploadControlprotected final UploadToRowCol -
Constructor Summary
ConstructorsConstructorDescriptionUploadToRowColExcel(UploadControl uc, UploadToRowCol uploadToRowCol) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidcell(String cellReference, String formattedValue, org.apache.poi.xssf.usermodel.XSSFComment comment) Callback for a detected cell Skipped cells will be added,voidendRow(int rowNum) Callback for row finishvoidheaderFooter(String text, boolean isHeader, String tagName) voidprocess()Open the file with the given uploadId, split it into rows and cells and write it to bcd_dataupload_stagingvoidprocess(org.apache.poi.openxml4j.opc.OPCPackage xlsxPackage) Processes whole workbook, currently only the first sheet is readvoidprocessSheet(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.voidstartRow(int rowNum) New RowMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler
endSheet
-
Field Details
-
DATE_FORMAT
- See Also:
-
EXCEL_CSV_DELIMITER
public static final char EXCEL_CSV_DELIMITER- See Also:
-
DATA_FORMAT_LOCALE
-
uc
-
uploadToRowCol
-
-
Constructor Details
-
UploadToRowColExcel
Constructor- Parameters:
uc-uploadToRowCol-- Throws:
Exception
-
-
Method Details
-
process
Open the file with the given uploadId, split it into rows and cells and write it to bcd_dataupload_staging- Throws:
Exception
-
startRow
New Row- Specified by:
startRowin interfaceorg.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler- Throws:
RuntimeException
-
endRow
Callback for row finish- Specified by:
endRowin interfaceorg.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:
cellin interfaceorg.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler- Throws:
RuntimeException
-
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:
IOExceptionorg.apache.poi.openxml4j.exceptions.OpenXML4JExceptionSAXExceptionParserConfigurationException
-