Jump to content
We've recently updated our Privacy Statement, available here ×

Once more OOME with large Excel Export


gal64

Recommended Posts

Hello,

I read in the forum all about exporting large reports and with the help of FileVirtualizers I can
now create large JasperPrint report representations. But I have to export to Excel and this
fails with OutOfMemory.

In the forum I read the following:

"JExcelAPI has been made more memory-scalable in terms of writing Excel files.
 Starting from version 2.6.5 you can use useTemporaryFileDuringWrite.
You probable need to subclass JExcelApiExporter in order to use this property."

which was posted on 06/16/2008 16:12.

I tried this, not with subclassing, but changing the code of "JExcelApiExporter"
in the following way (changing openWorkbook):

 

 

 	final String pathname = System.getProperty("user.home") + "/tmp";
 	final File tempdir = new File(pathname);
 	WorkbookSettings ws = new WorkbookSettings();
 	ws.setTemporaryFileDuringWriteDirectory(tempdir);
 	ws.setUseTemporaryFileDuringWrite(true);
 	try {
 		workbook = Workbook.createWorkbook(os, ws);
 	} catch (IOException e) {
 		throw new JRException("Error generating XLS report : " + jasperPrint.getName(), e);
 	}



But this did not help. Exporting still runs into OOME. Did I something wrong? Or is there
another possible solution for the problem.

Thanks for all answers.


 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Meanwhile I noticed that the code changings I made led to creating a temporary file in the folder "user.home"/tmp. But during the export process this file will never be attached again and doesn't change it's size.

The export still runs into an OOME so I suspect that there is no effect from my changings. Or do I have to change

some parameters or anything other?

I'm running Jasper Reports 3.6.0 under Windows XP.

Please help.

 

Regards, Gerhard

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...