I'm trying to build a very low-memory footprint XLSX row iterator, without
getting into the so-called "event/sax" model. All I want to be able to do
is iterate over rows in an xls, with each row being represented by something
like Row extends ArrayList, with empty cells being preserved.
I thought I'd found the solution with the new xssf.streaming package, but
I'm stumped and looking at the source code and documentation isn't helping
much as the documentation is all centered around writing, not reading, a
large xlsx file. So perhaps somebody can help me out here - Basically
what's happening is I'm creating an SXSSF workbook from an existing
workbook. The existing workbook contains data, but the SXSSF version does
not seem to have access to it. See the following code snippet:
[code]
Workbook wb = WorkbookFactory.create(new FileInputStream(new
File("/Users/BrianTrezise/Desktop/test1.xlsx")));
System.out.println("XSSF Sheet Name: " +
wb.getSheetAt(0).getSheetName());
System.out.println("XSSF Last Row Number: " +
wb.getSheetAt(0).getLastRowNum());
wb = new SXSSFWorkbook((XSSFWorkbook) wb);
System.out.println();
System.out.println("SXSSF Sheet Name: " +
wb.getSheetAt(0).getSheetName());
System.out.println("SXSSF Sheet Name: " +
wb.getSheetAt(0).getLastRowNum());
[/code]
[output]:
XSSF Sheet Name: new MFGs
XSSF Last Row Number: 7
SXSSF Sheet Name: new MFGs
SXSSF Sheet Name: 0
[/output]
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/Poi-3-8-Beta-5-Streaming-XSSF-Question-tp5490691p5490691.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]