I have very large xls file , which contains two sheets. I want to combine these two sheets into one and copy to new workbook . But I get out of memory exception when I try to access this large xls as below :
FileInputStream fis = new FileInputStream(new File("input.xls"));
HSSFWorkbook workbook = new HSSFWorkbook(fis);
I tried using event api for xls : http://poi.apache.org/spreadsheet/how-to.html#event_api But using that we can only read the cell values . But here I need to copy to new excel sheet.
-Xms
andXmx
parameters? - Jim Garrison-Xms1G -Xmx2G
? Can you run this on a system with more memory? Are you using the 64-bit JVM? - Jim Garrison