It seems that jasperreports 3.5.3 can use two kinds of "use case authors". By default, it is an exporter JRXlsExporterand does not work very well with large files (at least in my Spring MVC project).
The workaround is using another exporter based on JExcelAPI. I could export data without problems with this.
To create jasperreport use JExcelAPI in the Spring MVC installation , you need to write a personalized class. It is very simple:
import net.sf.jasperreports.engine.JRExporter;
import net.sf.jasperreports.engine.export.JExcelApiExporter;
import org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsSingleFormatView;
public class JasperReportsJExcelApiView extends AbstractJasperReportsSingleFormatView
{
public JasperReportsJExcelApiView()
{
setContentType("application/vnd.ms-excel");
}
protected JRExporter createExporter()
{
return new JExcelApiExporter();
}
protected boolean useWriter()
{
return false;
}
}
You will need jxl.jar in your classpath from the JExcelAPI 2.6 distribution.
source
share