You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Andreas Hartmann <an...@apache.org> on 2010/04/07 16:22:11 UTC

Parsing single sheets using the HSSF event API

Hi everyone,

is it possible to parse only a single sheet in a workbook using the 
event API? I want to do something like this:

* Detect the sheets using BoundSheetRecords
* Let the user select a sheet
* Import data from this sheet

Thanks a lot for any hints!

-- Andreas



-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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


Re: Parsing single sheets using the HSSF event API

Posted by "F. Da Costa Gomez" <da...@gmail.com>.
Hi,
I'v done something similar some while ago and posted te resulting class on the list ..
Might be handy to have a look.

Cheers,
F DCG
Sent from my BlackBerry® smartphone

-----Original Message-----
From: Andreas Hartmann <an...@apache.org>
Date: Thu, 08 Apr 2010 10:50:59 
To: <us...@poi.apache.org>
Subject: Re: Parsing single sheets using the HSSF event API

Am 07.04.10 16:22, schrieb Andreas Hartmann:
> is it possible to parse only a single sheet in a workbook using the
> event API? I want to do something like this:
>
> * Detect the sheets using BoundSheetRecords
> * Let the user select a sheet
> * Import data from this sheet

I figured out a way:

* Determine the position of the sheet (occurence of the BoundSheetRecord)
* Handle row records with row=0 to detect sheet starting points and 
enable/disable parsing accordingly

Is this a safe way to accomplish this task?

Thanks for any comments!

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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


Re: Parsing single sheets using the HSSF event API

Posted by Andreas Hartmann <an...@apache.org>.
Am 07.04.10 16:22, schrieb Andreas Hartmann:
> is it possible to parse only a single sheet in a workbook using the
> event API? I want to do something like this:
>
> * Detect the sheets using BoundSheetRecords
> * Let the user select a sheet
> * Import data from this sheet

I figured out a way:

* Determine the position of the sheet (occurence of the BoundSheetRecord)
* Handle row records with row=0 to detect sheet starting points and 
enable/disable parsing accordingly

Is this a safe way to accomplish this task?

Thanks for any comments!

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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