I have to write a workbook with 120,000 records. Hence It will have two worksheets. When I keep adding the rows to the worksheet, I will get the out of memory exception. I tried to use java-x but nothing much happened. Can somebody tell how to handle this situation?
POI uses a LOT of memory. It may very well be possible that that much data overwhelms it even when given lots of RAM. You could check out alternatives like jExcelAPI and jXLS.