Unfortunately my assumption was incorrect.
It seems like the structure below does not 'select' the sheet required! It
still iterates across *all* rows in the workbook as a whole.

If someone has a suggestion how to just select the rows for a particular
sheet, this would still be very welcome.

Tia,

Fermin DCG


On Wed, Jan 20, 2010 at 4:38 PM, Fermin Da Costa Gomez <
[email protected]> wrote:

> Found a solution to my own question ..
> Whilst processing all the records the BoundSheetRecord can be used to
> determine the sheet required.
> In the example code this structure is used in the XLS2CSV example, written
> by Nick Burch.
>
> I added a private sheetName and replace the BoundSheetRecord case with the
> following code.
>
> ...
>       case BoundSheetRecord.sid:
>           if (this.sheetName==null) { // Process ALL sheets
>               boundSheetRecords.add(record);
>           } else if
> (((BoundSheetRecord)record).getSheetname().equals(this.sheetName)) { // Only
> process one specified sheet
>               boundSheetRecords.add(record);
>           }
>         break;
> ...
>
>

Reply via email to