poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mahmood Naderan <nt_mahm...@yahoo.com.INVALID>
Subject XSSF and SAX
Date Thu, 04 May 2017 19:22:34 GMT
I read the document http://poi.apache.org/spreadsheet/how-to.html#sxssf in order to read a
large excel file. The example in that section left me with some questions.

I want to read the cells row by row, so I expect to see/write a nested loop for that. The
code for reading one sheet is

public void processOneSheet(String filename) throws Exception {
   OPCPackage pkg = OPCPackage.open(filename);
  		XSSFReader r = new XSSFReader( pkg );
  		SharedStringsTable sst = r.getSharedStringsTable();

   XMLReader parser = fetchSheetParser(sst);

  		// To look up the Sheet Name / Sheet Order / rID,
  		//  you need to process the core Workbook stream.
  		// Normally it's of the form rId# or rSheet#
  		InputStream sheet2 = r.getSheet("rId2");
  		InputSource sheetSource = new InputSource(sheet2);

As you can see, there is no such thing here. It is stated in the document that the reader
should be familiar with xml structure. I am not unfortunately... What is the outcome of parse()?

Thanks for any feedback. 

To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org

View raw message