I think you can do it with the replace keyword modifier and add a regex new line break? Using " \r\n" directly in the keyword modifier or using it via a regex asset.
Thanks Bart,
That didn’t work either, it’s no big deal really I just thought Matrix was able to add a line break. The client can right click on the cell/column > format cells > Text control: wrap text
Well, Matrix can generate any text you want it to really, it’s all about how the CSV reader needs to interpret it, so you just need to match that. Perhaps using just the keyword replace modifier is not enough and you need to use the regex asset to do the proper line replacement in. For example, try hardcoding the text first to figure out exactly what you need for the line break, once that works, then try and replicate it with the keyword.
So, if you list your results in asset listing why don’t you simply format your results using html/css under Type/Default Format? One of a nifty ways is e.g.:
where you can even use column headers for your data. Only, make sure you have your strings wrapped in quotes and leave a white space between data. You can also create and save XML from form submission and then convert it, format it and use data in any way you wish.
Also, bear in mind that encode (e.g.:UTF-8) plays a role in how data is processed and displayed.
Windows line-endings (\r\n) should work well, too - did you try with no comma up front?
If you don’t mind having to use SSJS, you could use the explode modifier to put your source value into an array and then iterate through the array printing out as you require.