You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Dobson, Paul L CTR USAF AFMC 416 SCMS/OBN" <Pa...@HILL.af.mil> on 2008/08/11 23:01:20 UTC

How to stop xssf event driven parsing after getting a specified row

I am using the xssf.eventusermodel  to parse potentially very large
excel files.  I only want to get the heading which is always in the
first couple lines of the sheet.  Is there a way to stop processing the
file once I parse the row that I need so I don't have to wait for the
entire sheet to process?

 


Re: How to stop xssf event driven parsing after getting a specified row

Posted by Nick Burch <ni...@torchbox.com>.
On Mon, 11 Aug 2008, Dobson, Paul L CTR USAF AFMC 416 SCMS/OBN wrote:
> I am using the xssf.eventusermodel to parse potentially very large excel 
> files.  I only want to get the heading which is always in the first 
> couple lines of the sheet.  Is there a way to stop processing the file 
> once I parse the row that I need so I don't have to wait for the entire 
> sheet to process?

If you're following the example from the howto, then it's just normal Java 
SAX xml stuff. I think you can just throw a custom exception, and the 
parsing will close itself down.

Nick

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