ChrisSamo632 commented on code in PR #9750:
URL: https://github.com/apache/nifi/pull/9750#discussion_r1974334477


##########
nifi-extension-bundles/nifi-poi-bundle/nifi-poi-services/src/main/java/org/apache/nifi/excel/ExcelHeaderSchemaStrategy.java:
##########
@@ -85,16 +85,18 @@ public RecordSchema getSchema(Map<String, String> 
variables, InputStream content
         int index = 0;
 
         while (rowIterator.hasNext()) {
-           Row row = rowIterator.next();
-           if (index == 0) {
-               fieldNames = getFieldNames(firstRow, row);
-           } else if (index <= NUM_ROWS_TO_DETERMINE_TYPES) {
-               inferSchema(row, fieldNames, typeMap);
-           } else {
-               break;
-           }
-
-           index++;
+            Row row = rowIterator.next();
+            if (index == 0) {
+                fieldNames = getFieldNames(firstRow, row);
+            } else if (row.getRowNum() == zeroBasedFirstRow) { // skip first 
row of all sheets

Review Comment:
   What do you think about clarifying the `USE_STARTING_ROW` description to 
note that the header is skipped in each worksheet, but the schema is inferred 
from only the first worksheet?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to