How to add CRLF as end of record delimiter
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I have a .csv file that I have turned into fixed width using the padright function and stringing everything together to be in one column, however, I need to add CRLF as an end of record delimiter. Does anyone know how I can do this?
Solved! Go to Solution.
- Labels:
- Best Practices
- Output
- Regex
- Tips and Tricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @trevorwightman,
You can change the delimiter here. By CRLF do you mean a Line Feed (\n)? in which case you can use \n
If you have any questions make sure to ask :)
HTH,
Ira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@IraWatt They haved asked for the file to be delimited by "Carriage Return Line Feed". I initially tried using the delimiter of "\n", however, on rows that contained an apostraphe it would put quotes around the record (I thought this would mess with the fixed width format). My workaround was to use the delimiter of "\0" such that these double quotes were not present and everything visually lined up.
With the delimiter of the \0 a sample record would be output as:
Bob's Icecream Shop 123 Main Street 12345
With the delimiter of the \n a sample record would be output as:
"Bob's Icecream Shop 123 Main Street 12345"
Since the file needs to be fixed width the addition of the double quotes pushes everyone over one character. Or do these double quotes not affect anything and can in fact be part of the file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@trevorwightman I don't seem get any "" when I use \n:
By fixed width do you mean there is a maximum string length? Would you be able to share a screenshot of the issue or an example of the issue?
Thanks,
Ira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Using the delimited of \n worked. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Awesome glad it sorted it ! @trevorwightman
