Bug 52786 - Not able to write more than 100 rows using SXSSF
Summary: Not able to write more than 100 rows using SXSSF
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: SXSSF (show other bugs)
Version: 3.8-dev
Hardware: PC Windows XP
: P2 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-28 12:14 UTC by sabdulrazak
Modified: 2012-02-28 13:47 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sabdulrazak 2012-02-28 12:14:14 UTC
Hi,
I am trying to create an xlsx file and I have used SXSSF Workbook. I am able to create a file with more than 100 rows when I run a java client independently. But when I deploy it on my Websphere 6.1 server it writes only the first 100 rows and skipping the rest of the rows.

Can you please advice?
I am using poi-3.8-beta5 version. Here is the code snippet.

Workbook wb = new SXSSFWorkbook(100); // keep 100 rows in memory, exceeding rows will be flushed to disk
        SXSSFSheet sh = (SXSSFSheet)wb.createSheet();

for(int rownum = 0; rownum < 10000; rownum++){
            Row row = sh.createRow(rownum);
            for(int cellnum = 0; cellnum < 35; cellnum++){
                Cell cell = row.createCell(cellnum);
                //String address = new CellReference(cellnum).formatAsString();
                cell.setCellValue("Hello World " + cellnum);
           }
}
FileOutputStream out;
		try {
			out = new FileOutputStream(filePath);
			wb.write(out);
			out.close();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
Comment 1 Yegor Kozlov 2012-02-28 13:47:02 UTC
It is a problem with WebSphere, not with POI. 

SXXSF writes temp files. Ensure your application has access to the temp directory.

Yegor