Export as XLS Problems


Hello, i have several problems while exporting my reports (Jasperserver 6.1.0) as an Excel-File.

I tried several settings and properties, but most of them did not help.

Note: i can NOT set the properties in each report, because i have to manage about 25+ reports - and future property-changes would end horrible if i have to set them in each report ...
So i tried to use the 'jasperreports.properties' in the 'apache-tomcat\webapps\jasperserver\WEB-INF\classes' folder
and the 'applicationContext.xml' in the 'apache-tomcat\webapps\jasperserver\WEB-INF'

What do i need?
Short form: something like the CSV exporter does ==> no font colors, no wierd column or row size changes
but i cannot use the CSV exporter, because the encoding does not work for french characters, Umlaute and so on (example: 'Erlöse')
SOLUTION for CSV:  net.sf.jasperreports.export.csv.write.bom=true


in 'jasperreports.properties' did not help

Long form:
* i would like to disable all kind of formatting (ignore the report specific formatting):
all fonts are black,
all fonts use the same size (in contrast to the normal PDF report)
* no column or row merging

current settings in jasperreports.properties:


and the 'applicationContext.xml':

<bean id="xlsExportParameters" class="com.jaspersoft.jasperserver.api.engine.jasperreports.common.XlsExportParametersBean">
<property name="detectCellType" value="false"/>
<property name="onePagePerSheet" value="false"/>
<property name="removeEmptySpaceBetweenRows" value="true"/>
<property name="removeEmptySpaceBetweenColumns" value="true"/>
<property name="whitePageBackground" value="false"/>
<property name="ignoreGraphics" value="true"/>
<property name="collapseRowSpan" value="false"/>
<property name="ignoreCellBorder" value="true"/>
<property name="fontSizeFixEnabled" value="false"/>
<property name="maximumRowsPerSheet" value="0"/>
<property name="xlsFormatPatternsMap" ref="formatPatternsMap"/>

thanks for help

k.Herkt's picture
Joined: Feb 10 2016 - 4:00am
Last seen: 2 years 7 months ago

3 Answers:


Did you set the following property when exporting to csv?

net.sf.jasperreports.export.csv.write.bom = true

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 year 2 months ago

Thank you very much.
This seems to be a good workaround for me.

Is there still a way to set a "default" font and font color for the XLS exporter?
This default setting should overrule the settings in the report because:
 * Some of my reports are using WHITE as font color (some headers), if you export them as XLS you wont see much, because the cells are also white.
 * I also would like to use ONE font size for the XLS export (like the CSV export), even if my report contains several sizes (e.g 12, 16 and 24 with bold)

thank you

k.Herkt's picture
Joined: Feb 10 2016 - 4:00am
Last seen: 2 years 7 months ago

You'll need to write your own exporter or servlet using JasperReports library to do that. That's what I usually do when properties aren't enough.

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 year 2 months ago