Vincenzo Lombardo created NIFI-16443:
----------------------------------------

             Summary:  Add Ignore Cells Beyond Header property to ExcelReader
                 Key: NIFI-16443
                 URL: https://issues.apache.org/jira/browse/NIFI-16443
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Extensions
            Reporter: Vincenzo Lombardo
         Attachments: excel-reader-extra-cells-sample.xlsx

When the ExcelReader is configured with Schema Access Strategy "Use Starting 
Row", schema inference fails
if any evaluated row has more cells than the header row:

  SchemaNotFoundException: Row 1 has 14 cells, more than the expected 6 number 
of field names

This is common with spreadsheets edited by hand or exported from other tools: 
cells to the right of the
data are often blank but formatted, and Apache POI includes them in Rowe looks
correct in Excel, but cannot be read without manually cleaning it first.

Proposed change: add an optional property "Ignore Cells Beyond Header" (default 
false, so the current
behavior is unchanged), visible only with the "Use Starting Row" strate
- cells beyond the last header column are ignored during schema inference;
- blank cells (including whitespace-only strings and formulas evaluatinignored 
silently;
- when ignored cells contain a value, a single warning per sheet is logged, 
reporting the number of
  affected rows and the first position (row and column), so that data i

Only the rows evaluated according to the "Row Evaluation Strategy" are
The record reader already ignores cells beyond the schema fields when unknown 
fields are dropped.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to