Export to Excel does not handle Line Feed in the column value
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:
Steps to Reproduce
- Input a new CASE with linefeed in the request description.
- Export the report to XLS.
Excel interprets a newline as a directive to move to the cell below the current cell. This is the expected behavior.
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.
0% found this useful