Alteryx Designer Desktop Discussions

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

Eliminate blank row at the end of .txt Output

BautistaC888
8 - Asteroid

Hello,
The .txt output is generating an extra line, that i can´t eliminate. Here is the example:
BautistaC888_0-1643996724498.pngBautistaC888_1-1643996750641.png
Here is my output tool configuration.

BautistaC888_2-1643996867071.png

Thank you.

 

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @BautistaC888 

 

can you provide a sample data file to work.

 

Happy to help : )

BautistaC888
8 - Asteroid

Here is an example. It should be 1942 lines but is generating 1943.

Maskell_Rascal
13 - Pulsar

Hi @BautistaC888,

 

This is expected behavior and unfortunately there is no way for you to eliminate that line when writing to an output. At least not one that is simple. 

 

The Output Tool when writing to a CSV Text file will end every line that contains data with an EOL(end of line) character based on the style you chose. 

 

Windows = CRLF (carriage return/line feed)

Unix = LF (line feed)

Mac = CR (carriage return)

 

All of these options essentially do the same thing, which is add an extra line at the end of your output. When you read this data back into Alteryx, or other programs like Python or R, this extra line gets ignored.  

 

Cheers!

Phil

 

 

danilang
19 - Altair
19 - Altair

Hi @BautistaC888 

 

For a slightly less "simple" way, try this

danilang_0-1644065262264.png

 

Concat all the lines with \n as the delimiter.  Convert the concatenated string to blob using ANSI - Latin 1 as the code page and then use a Blob Output tool to write the file.  The output now looks like this

 

danilang_1-1644065451409.png

You may have to play with the delimiter to get an output that's acceptable to your target program.  The \n delim only adds the linefeed character at the end.  If you need both CR\LF then use a formula tool the to add CR\LF to the end of each line before the Summarize tool and remove the delimiter from the concat.  The formula to add CR\LF to [Field_1] will be [field_1]+CharFromInt(13)+CharFromInt(10)

 

Dan

 

 

Labels