1

I am trying to convert one Excel to CSV with Apache Nifi. When the first row has less cell values with information than the other rows of the document (for example, the first row has 5 cells, the 2th -> 8 cells, the 5 -> 7 cells), the parsing of the document only takes into account the number of cells of the first row (5). So I am losing information (in the example case, the 2th row would lose 3 cell values and the 5th, 2).

Another visual example:

enter image description here

The configuration of my process looks like:

enter image description here

Can anyone tell me how to solve the problem?

1
  • add all columns to the first row Commented Apr 24, 2020 at 12:21

1 Answer 1

1

@Jaime - The NiFI Processor ConvertExcelToCSVProcessor makes some assumptions which you have noticed. It assumes you are sending a consistent set of data in each row. Your Excel doesn't meet these basic assumptions.

My best advice is to fix the desperate data in the excel sheet. Add missing columns with data you can remove/ignore later. The only other choice would be to remake the processor as a custom processor Where you could have it check every row, get the row with the most columns, use that for the column count.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.