You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Ron LaJeunesse <rl...@specialized.com> on 2004/03/10 18:35:49 UTC
SHEETPROTECTION record
Protecting a sheet is easy enough, but in BIFF8X there is a SHEETPROTECTION
record (sid 0867H, described in excelfileformat.pdf, p. 165) which allows
setting of sheet-protection options, which I need. There seems to be no
existing support in HSSF (or is there?). I have gone so far as to create a new
org.apache.poi.hssf.model.SheetProtectionRecord.class, but I don't see any way
to add a custom record to a sheet. I've also tried creating a SHEETPROTECTION
record using UnknownRecord, but again, how do I add it to a sheet?
My goal is to protect the sheet so that some cells are locked, but others are
editable (and columns can be resized, etc.). With the sheet.setProtect(), it's
all or nothing - either all cells are editable, or none are, regardless of a
cell's locked state. Maybe there's another way to do this without going so
deep into custom/unknown Records? Thx...
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: SHEETPROTECTION record
Posted by Danny Mui <da...@muibros.com>.
when populating sheets, records are popped in through the
model.Sheet.createSheet(list..) method.
new records are recognized through the RecordFactory via their sid
attribute.
check bugzilla and see if we have an enhancement request up there, if we
do, vote for it. otherwise submit one so it's on the "list".
Ron LaJeunesse wrote:
> Protecting a sheet is easy enough, but in BIFF8X there is a SHEETPROTECTION
> record (sid 0867H, described in excelfileformat.pdf, p. 165) which allows
> setting of sheet-protection options, which I need. There seems to be no
> existing support in HSSF (or is there?). I have gone so far as to create a new
> org.apache.poi.hssf.model.SheetProtectionRecord.class, but I don't see any way
> to add a custom record to a sheet. I've also tried creating a SHEETPROTECTION
> record using UnknownRecord, but again, how do I add it to a sheet?
>
> My goal is to protect the sheet so that some cells are locked, but others are
> editable (and columns can be resized, etc.). With the sheet.setProtect(), it's
> all or nothing - either all cells are editable, or none are, regardless of a
> cell's locked state. Maybe there's another way to do this without going so
> deep into custom/unknown Records? Thx...
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org