Utilizing the standard 'Download' capability in a customer center data list (DW 9.17.10), unwanted line breaks appear in the .csv download file (sample attached and screenshot below). Any ideas on how to mitigate this?
Developer forum
E-mail notifications
Line break in data list 'Download' functionality
Replies
Is that because you're opening it as plain text? What if you go to the Data tab in Excel and click Get Data | From File | From Text / CSV and then import the CSV document?
Oh, I missed the download and now see that it does the same when I import the file. Looks like that data is in the database, and that DynamicWeb doesn't wrap the text in quotes, causing the new line in text to be treated as a new row.
Hard to find this feature.
But this is datalist export to CSV.
I think you have a line break in the order state called "shipped and invoiced" which probably is like this in the database;
"shipped and
invoiced"
So you can probably change that or replace the linebreak in the SQL on this datalist.
BR Nicolai
Thanks Nicolai and Imar for the quick responses! This was also my first thought and unfortunately didn't see any indication of a line break in the DB or anything wonky happening in the data list statement itself (attached for reference). Any other ideas on where to check?
Can you confirm 100% that there's no line break? SSMS may still display items on one line even if there's a line break, and so may a text box, masking the issue. What does this query give you?
SELECT REPLACE(OrderStateDescription, CHAR(10), '#') from EcomOrderStates
This replaces a line break with a # symbol. You may also need to replace CHAR(13) instead.
If you see a # symbol in the results, the line break is there in the database. Otherwise, I'm not sure why you get this result.
Imar
Imar,
You were right! That's exactly what it was. Filing away that handy trick for future reference. (OrderStateName, btw, not OrderStateDescription).
SELECT REPLACE(OrderStateName, CHAR(10), '#') FROM EcomOrderStates
SELECT REPLACE(OrderStateName, CHAR(13), '#') FROM EcomOrderStates
Fixed:
You must be logged in to post in the forum