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 Locale
static final String
static final char
protected final UploadControl
protected final UploadToRowCol
-
Constructor Summary
ConstructorsConstructorDescriptionUploadToRowColExcel
(UploadControl uc, UploadToRowCol uploadToRowCol) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 finishvoid
headerFooter
(String text, boolean isHeader, String tagName) void
process()
Open the file with the given uploadId, split it into rows and cells and write it to bcd_dataupload_stagingvoid
process
(org.apache.poi.openxml4j.opc.OPCPackage xlsxPackage) Processes whole workbook, currently only the first sheet is readvoid
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 RowMethods 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
-
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:
startRow
in interfaceorg.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler
- Throws:
RuntimeException
-
endRow
Callback for row finish- Specified by:
endRow
in 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:
cell
in 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:
IOException
org.apache.poi.openxml4j.exceptions.OpenXML4JException
SAXException
ParserConfigurationException
-