Support Article
Export to Excel does not handle Line Feed in the column value
SA-21429
Summary
Developer is doing an "Export to Excel" of case details, including a description whose text contains embedded newlines, that is a multi-paragraph description:

Excel puts each paragraph in a separate cell in the resulting spreadsheet:

Error Messages
Not Applicable
Steps to Reproduce
- Input a new CASE with linefeed in the request description.
- Export the report to XLS.
Root Cause
Excel interprets a newline as a directive to move to the cell below the current cell. This is the expected behavior.
Resolution
Here’s the explanation for the reported behavior:
There is a way to programmatically embed newlines in text that is intended to populate a single cell. It involves the following tag containing Microsoft specific attributes:
<br style="mso-data-placement:same-cell;" />
This will make Excel insert a line break into the text without having the rest of the text go to the cell below.
Published July 22, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.