Skip to main content
Saraali
Silver ⭐️⭐️
December 13, 2021
Question

how to convert CSV to excel using apache nifi

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

MattWho
Titanium ⭐️⭐️⭐️
Titanium ⭐️⭐️⭐️
December 13, 2021

@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-apache-nifi

 

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

Translate
Saraali
SaraaliAuthor
Silver ⭐️⭐️
December 14, 2021

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 ? 

Translate
MattWho
Titanium ⭐️⭐️⭐️
Titanium ⭐️⭐️⭐️
December 14, 2021

@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

Translate