Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Change newline in FileOutputDelimited to CRLF

Hi!
How can I change the newline in FileOutputDelimited to CRLF?
It only uses a CHAR, though it accepts a string but then ignores everything but the first sign!
Ideas?
TIA
Andre
Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi Andre,
use "\r\n" instead.
Bye
Volker
Anonymous
Not applicable
Author

Hi,
I can't! As I wrote - admittedly not too clearly - csvwriter ignores everything but the first character as a newline, since it manages the newline internally as a "char"-datatyped value. No String possible here!
If one would be able to not define the value in the component (which is not possible, as the property is required) the csvwriter instance of the component would use the system property "line.separator" as a newline. But changing this is not what I want! It is anything but a feasible workaround.
More ideas? currently I sent the generated file to an external converter tool. ugly 0683p000009MACn.png
TIA
Andre
Anonymous
Not applicable
Author

Hi Andre,
which version are you using. I took a look at the 3.1.3 code and for me it looks like the row separator is defined as TEXT in the xml-definition-file and handled as String in the code.
And default value is "\n" a String too.
Bye
Volker
Anonymous
Not applicable
Author

The property is a string, but internally it uses a class named CSVWriter, which only uses a char as the line separator.
Anonymous
Not applicable
Author

@ORBIT_Andre
Have you tried it?
The underlying code just appends the line separator to the end of the current row, so any string is valid.