Why it happened?
The new Engine of JasperSoft needs some properties of exporting excel to be set, which is not the case in our reports.
Solution
In the jrxml file we need to add the missing properties of exporting excel. Here is the list of properties :
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
<property name="net.sf.jasperreports.export.xls.white.page.background" value="false"/>
<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/>
<property name="net.sf.jasperreports.export.xls.ignore.graphics" value="false"/>
<property name="net.sf.jasperreports.page.break.no.pagination" value="apply"/>
<property name="net.sf.jasperreports.exports.xls.font.size.fix.enabled" value="false"/>
<property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
Brief explanation of each property
· <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/> → This property gets rid of one row with a very large row height at the end of the data tab.
· <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/> → This property gets rid of empty columns, such as caused by margins, or by poor layout.
· <property name="net.sf.jasperreports.export.xls.white.page.background" value="false"/> → This property shows the Excel grid lines, otherwise you get solid white.
· <property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/> → This property tells Excel to treat dates as dates, numbers as numbers, instead of all being treated as text.
· <property name="net.sf.jasperreports.export.xls.ignore.graphics" value="false"/> → This propery tells Excel to not delete the company logo graphic
· <property name="net.sf.jasperreports.page.break.no.pagination" value="apply"/> → This property for pagination.
· <property name="net.sf.jasperreports.print.keep.full.text" value="true"/> → This property keeps JS from truncating values wider than the explicitly set column widths.
· <property name="net.sf.jasperreports.exports.xls.font.size.fix.enabled" value="false"/> → This property keeps JS from reducing the font size by 1 when exporting to Excel.