Issue DescriptionWhen running a report and generating an XLSX output, opening the resulting file results in the following error: | [toc] |
Microsoft Excel We found a problem with some content in "filename.xlsx". Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes. Excel was able to open the file by repairing or removing the unreadable content. Removed Records: Named range from /xl/workbook.xml part (Workbook)
Resolution
An offending group header row was the problem and needed to be removed in the case of exporting to XLSX. This group header row was in a table component using data from a subdataset. Removing the group header requires the following modifications to the JRXML:
<property name="net.sf.jasperreports.export.xlsx.exclude.origin.group.3" value="Group2"/> <property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.3" value="groupHeader"/> <property name="net.sf.jasperreports.export.xlsx.exclude.origin.report.3" value="*"/>
Where Group2 is the offending group header in the table component.
Recommended Comments
There are no comments to display.