CF linebreaks in excel same cell

By default when you add the BR tag inline Excel will interpret that as you want a new cell. We sometimes merely want a line break.

When outputing to excel use this syntax in your code to keep linebreaks in the same cell.

<cfoutput>
#variablename# <br> // new Cell
vs
#variablename# <br style="mso-data-placement:same-cell;" />

Cup size   
Select size then click on coffee cup.
This entry was posted in Coldfusion, Snippets and tagged . Bookmark the permalink.