Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

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:

Error Messages

Not Applicable

Steps to Reproduce

  1. Input a new CASE with linefeed in the request description.
  2. 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.


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

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us