Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

CSV output headers not in 1 row but instead appears as 2 rows.

Apizzacake
6 - Meteoroid

Hi. I have an issue when I am trying to output csv file. For whatever reason the headers are coming out in 2 rows instead of 1 (Please refer to csv file attached).
I don't understand the cause of this. Can someone help me here? 

 

Also to note the data is coming out fine. It is just the headers that are being messed up.

Please find attached screenshot of my CSV output file settings. 
For context also, I have 4 csv output files. But 2 of them are coming out with headers like this and for another 2 the headers are being displayed just fine.

 

Thanks!

7 REPLIES 7
stataltgee
9 - Comet

@Apizzacake in your workflow do the headers appear in two rows? If yes then the output will come the same way.

Apizzacake
6 - Meteoroid

Hi, no it does not appear in 2 rows, this is the select tool just before the csv output.

Apizzacake_0-1754641959340.png

 

Raj
16 - Nebula

@Apizzacake can you share workflow with sample data
will try to help

Gaurav_Dhama_
12 - Quasar

two questions:

1. How are you taking the output? is it single Output Data tool with fixed path or any other method?

2. Is the screenshot in reply is of the file that spilled the headers to 2 rows?

Apizzacake
6 - Meteoroid

hi, Gaurav. it is a single output csv file but I appended the file path to match an output folder that I want the file to go to.

Yes the screenshot in reply is that of the file that split the headers to 2 rows.

Upon further inspection under the csv output file. When i set quote output files to auto. This appears. Currently I require the file to never quote output fields.

Apizzacake_0-1754647115602.png

To solve, i basically renamed this header to be the same. And now it is working fine

Apizzacake_1-1754647181535.png

 

Attached is my workflow showing 2 outputs of quoted and unquoted coming out differently. Is it possible that it is due to the renaming of the header being wrong?

Gaurav_Dhama_
12 - Quasar

So here is the culprit, column name "Income Currency Code" has new line at the end of it. That is why you are seeing headers breaking into two rows. See the snip below.

 

Gaurav_Dhama__0-1754650478740.png

 

To fix this, you can just add a dynamic rename and use trim.

Gaurav_Dhama__1-1754650535006.png

Attached is the workflow.

Apizzacake
6 - Meteoroid

thanks this works

Labels
Top Solution Authors