Forum Discussion
Retaining line breaks in exported report data
Hi everyone
Apologies if this is the wrong forum. It seemedl ike the best bet.
I've built a fairly straightforward report using Salesforce reports as datasources. One of the fields is a fairly long-winded measure that provides quite a bit of summary data as text in a single field, including multiple line breaks. The reason for this is that contextual info needs to be manually added before it gets sent to stakeholders, so that data gets exported from the report table, pulled into Excel and then context added (our directors are pretty old school in that regard).
The problem I have is that line breaks aren't being retained after exporting the table data, regardless of whether I do it to a csv through Desktop or to a xlsx via powerbi.com. I've tried unichar 10 and 13, quotes around the cell content, everything I can think of and no matter what I do, everything is dumped into a single line. For example:
"Hi" & UNICHAR(10) & "my name is" & UNICHAR(10) & "what"
Displays perfectly in a Power BI table cell as:
Hi
my name is
what
But in csv/xlsx is produces:
Himy name iswhat
Can anyone offer any thoughts on how to get those line breaks into Excel?
6 Replies
- Ahmedx
Super User
pls try this
- Ahmedx
Super User
or
- jay_zaFrequent Visitor
Hi Ahmed
I appreciate the thoughts, but a) unicode 160 is a non-breaking space, not any form of line break, and b) I can get it to display perfectly in a Power BI table using UNICHAR(10) or (13). As detailed in my first post, I need to find a way for the line breaks to carry through into a csv or xlsx when I export the table data.