Github user patricker commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2194#discussion_r144222681
--- Diff:
nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/src/main/java/org/apache/nifi/processors/poi/ConvertExcelToCSVProcessor.java
---
@@ -220,45 +287,43 @@ public void process(InputStream inputStream) throws
IOException {
* @param session
* The NiFi ProcessSession instance for the current invocation.
*/
- private void handleExcelSheet(ProcessSession session, FlowFile
originalParentFF,
- SharedStringsTable sst, final InputStream sheetInputStream,
String sName) throws IOException {
+ private void handleExcelSheet(ProcessSession session, FlowFile
originalParentFF, final InputStream sheetInputStream, ExcelSheetReadConfig
readConfig,
+ CSVFormat csvFormat) throws IOException {
FlowFile ff = session.create();
try {
+ final DataFormatter formatter = new DataFormatter();
+ final InputSource sheetSource = new
InputSource(sheetInputStream);
+
+ final SheetToCSV sheetHandler = new SheetToCSV(readConfig,
csvFormat);
+
+ final XMLReader parser = SAXHelper.newXMLReader();
+ final XSSFSheetXMLHandler handler = new XSSFSheetXMLHandler(
+ readConfig.getStyles(), null,
readConfig.getSharedStringsTable(), sheetHandler, formatter, false);
--- End diff --
Thanks. I tried not passing in a DataFormatter, and that just threw a null
exception. I'll try not passing in a Style Table.
---