We don't have HSSFSheet.getSheetName() or HSSFSheet.getSheetIndex(), so given a 
HSSFSheet object
you can't get the name. Looks like a a design drawback.

It's more or less clear to me how to fix it.
When we access a sheet from HSSFWorkbook we should remember its index. There 
are lots of places where the sheet index is involved
including HSSFWorkbook.cloneSheet() and HSSFWorkbook.setSheetOrder(String 
sheetname, int pos). All of these should be covered.

Do you want to write the patch yourself? If you do, I can help or explain. 
Otherwise I will put it in my TODO list
and it will take some time.

Regards,
Yegor

> I'm trying to write a patch for shiftRows() method in HSSFSheet class (bug
> 43434, this bug looks like bug 34023, but for named regions).

> That patch would look for all HSSFName objects and change their AreaReference,
> but I have a problem!!! I need to parse string like this: 
> SheetName!$A$21:$C$21
> this is very simple to do, but I should now the name of sheet at I'm shifting
> rows.... HSSFSheet does not contains any name or index :(.... 

> any ideas?


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


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

Reply via email to