Support Questions
Find answers, ask questions, and share your expertise

Convert xls files to csv files in apache NIFI

Convert xls files to csv files in apache NIFI

Explorer

Hello guys I'm trying to convert .xls files to .csv in apache NIFI data flow. I tried many solutions with no result I even tried creating a script like this sccript

Thank you in advance

10 REPLIES 10

Re: Convert xls files to csv files in apache NIFI

Expert Contributor

@totti1 

Haven't done this until now, but there is a ConvertExcelToCSVProcessor  Processor.

Have you tried this?

Re: Convert xls files to csv files in apache NIFI

Explorer

Thank you for your replie 

 

Yes I tried and this processor only convert .xlsx files not .xls files

Re: Convert xls files to csv files in apache NIFI

Expert Contributor

@totti1 

Oh, that's a shame and would have been to easy...

Can you tell what other options you have tried?

Can you provide information on what the data looks like?

Re: Convert xls files to csv files in apache NIFI

Explorer

I tried using ExecuteStreamCommand processor to convert to csv using python script but it says can't run this file because it isn't a win32 app 

Re: Convert xls files to csv files in apache NIFI

Expert Contributor

@totti1 

I can't confirm that ConvertExcelToCSVProcessor processor does not work with xlsx.
It works, only thing I haven't achieved until now is to format the csv-output in the right manner.

 

Maybe this will help you to get it?

My test xlsx data:

 

id	title	first	last
1	miss	marlene	shaw
2	ms	letitia	jordan
3	mr	todd	graham
4	mr	seth	martinez
5	mr	guy	mckinney
6	ms	anna	smith
7	mr	johnny	johnson
8	mrs	robin	white
9	miss	allison	williams
10	mrs	erika	king

 

 

ProcessorsProcessorsFlowFlow

 

My not correct formatet temporary csv-output:
temporary csv-outputtemporary csv-output

Re: Convert xls files to csv files in apache NIFI

Explorer

I know it works for .xlsx files but don't work for .xls files

Re: Convert xls files to csv files in apache NIFI

Explorer

I already tried ur solution and no result

Thank you

 

Re: Convert xls files to csv files in apache NIFI

Expert Contributor

@totti1 
I'm sorry, I'm obviously confused.   :-((

Just to correct the csv-output for the solution you don't need (but maybe someone else...) I add this picture:
correct csv output formatcorrect csv output format

Re: Convert xls files to csv files in apache NIFI

Explorer

Okey Thank You so much