Support Questions

Find answers, ask questions, and share your expertise

how to convert CSV to excel using apache nifi

avatar
Explorer

Hello everyone

 

in this day I tried to convert CSV  file to xlsx file using Apache nifi 

but i couldn't anyone knows? 

or any idea on how to get NIFI flow output as .xlsx file 

 

 

 

 

 

 

3 REPLIES 3

avatar
Master Mentor

@Saraali 

NiFi on contains components for reading XLXS files and converting them to CSV.  There are no native components included with NiFi that can convert the other direction.

That being said, NiFi offers numerous processors that allow you to execute your own scripts or external commands against the content of a NiFi FlowFile.

Here is an example where someone converted from CSV to Excel by passing the FlowFile content to an externally executed python script:
https://stackoverflow.com/questions/68937735/how-to-convert-csv-to-excel-using-python-with-pandas-in...

 

If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post.


Thank you,

Matt

avatar
Explorer

Hello Matt 

 

Well, I see that I saw this link and tried but I got this error

Screenshot 2021-12-13 164709.png 

 

another thing 

when flow from NIFI return CSV there is encoding problem because that i want to convert csv to excel  

like this : 

Screenshot 2021-12-14 081932.png

 

How Can I solve this problem ? 

avatar
Master Mentor

@Saraali 

I'd love to help, but I have never done any scripting to convert to excel format.  All I can tell you is there is no native processor available in NiFi that does this conversion.

I'd recommend raising a new feature request jira in apache for NiFi:
https://issues.apache.org/jira/projects/NIFI/issues/

Perhaps others in the community may be looking for the same capability who are willing to contribute code?

Thanks,

Matt