Support Questions

Find answers, ask questions, and share your expertise

Convert xls files to csv files in apache NIFI

avatar
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

avatar
Master Collaborator

@totti1 

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

Have you tried this?

avatar
Explorer

Thank you for your replie 

 

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

avatar
Master Collaborator

@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?

avatar
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 

avatar
Master Collaborator

@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

avatar
Explorer

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

avatar
Explorer

I already tried ur solution and no result

Thank you

 

avatar
Master Collaborator

@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

avatar
Explorer

Okey Thank You so much