Velocity Export to Excel keep linefeeds or bullet points

By Harald posted 02-16-2016 13:17

  
Don't use $velocityReportUtil.getValueForField($vDoc.document,$vDoc.documentTypeDto,"description",$dateFormat,true), this removes everything.

At first replace "</br>" with "&#10;&#13;" then use the replaceBreakForExcel function that does more than it says.

See sample code below:

#if ($vDoc.document.description)
<Cell ss:StyleID="s60">
<Data ss:Type="String">
$velocityReportUtil.replaceBreakForExcel($vDoc.document.description.replace("<br/>","&#10;&#13;"))
</Data></Cell>
#else
 <Cell ss:StyleID="s60"><Data ss:Type="String"></Data></Cell>
#end

#BIRT
1 comment
102 views

Comments

02-16-2016 18:32

Thanks for sharing that tip!