On Thu, 6 Sep 2007, Wakebrad wrote:
> Is there a way to get the names of the worksheets and declare which
> worksheet to parse using the event model. I can't find a way to get an
> inputstream from an HSSFSheet or a way to retrieve a sheet from the
> POIFSFileSystem.

Not easily, no. IIRC, the excel OLE2 stream will contain all your sheets.

What you'll probably need to do is process your document twice. On the
first parse, grab all the sheet records, and offer up the list to your
users (you probably want the BoundSheetRecords). On the 2nd pass, wait
until your sheet of interest, then grab the data until the next one.

As a starting point, I'd suggest baseing some code on
org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener
and uncommenting all the print statements, so you can see the record
structure

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to