Thursday, May 3, 2012

Jxl Performace Tweak

I recently had to generate an excel report with large data set, but it kept failing as it goes out of memory, so i implemented below tweak in order to get output in a proper manner.

WorkbookSettings wbSetting = new WorkbookSettings();  
wbSetting.setArrayGrowSize(5*(int) Math . pow ( 1024 , 2 ));   
wbSetting.setUseTemporaryFileDuringWrite(true);  
WritableWorkbook workbook = Workbook.createWorkbook(response .getOutputStream(), wbSetting);

Keep visiting my blog,

Thanks,

Ujjwal Soni

No comments: