Export to csv issue with spaces
in LAE (and the imported to D360 version) when I am exporting to a csv, i have 3 spaces in the last field... but i am doing this differently..
Since my csv file has a footer row that is different fields, I am building each row as 1 field then sending that to the csv out node.
LINEOUT="1,2,3,4, "
in the old superseded node, it works fine.. the file has the 3 spaces at the end (in the last field)
the new node doesnt.. it trims off the 3 spaces?
if I add another ,
LINEOUT="1,2,3,4, ,"
it shows.. but without that, they are removed. Help!
-
The Output csv/delimited node trims excess trailing and leading spaces per field. Since your LINEOUT variable is acting as a single field, adding the extra comma to the end "protects" the spaces from getting trimmed.
While testing this internally, I also noticed that the Output csv/delimited node uses RFC-4180 as its default csv definition. RFC-4180 says trailing and leading spaces shouldn't be trimmed, so I'll check internally on this too, but in the meantime, if you're able to add any extra character after the spaces, that will keep the spaces in-tact.
Please sign in to leave a comment.
Comments
3 comments