dan-s1 commented on code in PR #9750:
URL: https://github.com/apache/nifi/pull/9750#discussion_r1975513948
##########
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:
That is a great suggestion! I will take care of that.
--
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]