No idea, if this helps with OOM Errors, but we use OracleCachedResultSet
and simply write this RS out. This reduces the handling of Arraylists
and might reduce Problems there.
But I guess the problem is with POI and the XLS-File itself. Is csv an
output option?
HtH,
Karsten.


-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 25. Januar 2006 12:40
An: [email protected]
Betreff: resultset from Oracle to a HSSFSheet 

java.lang.OutOfMemoryError

Hello,

I'm getting a resultset from Oracle.
I need to get colums name and the resultset in a HSSFSheet of my
HSSFWorkbook.
It will looks like toad view data (top-> colums name and data after).
I create an arraylist of arraylist
        1)the colums name for the first arraylist,
        2)data
After i loop into the arraysList of arrayList, and i tried to set the
value of the entire HSSFSheet with this method:
        oneSheet = workBook.getSheetAt(sheetNb);
        oneRow = oneSheet.getRow(rowNb);
        if (oneRow == null) {
                oneRow = oneSheet.createRow(rowNb);
        }
        oneCell = oneRow.getCell((short) cellNb);
        if (oneCell == null) {
                oneCell = oneRow.createCell((short) cellNb);
        }
        oneCell.setCellValue(stringValue);

There are just 46 000 rows and for each rows 25 cells.

At the end i have this exception:
java.lang.OutOfMemoryError

Do you know an other way to set the value of a HSSFSheet from an
ArrayList, Hashmap, Array?

Thx

benjamin CHALLAMEL,


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to