poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sascha Schaefer" <Sascha.Schae...@ebcsoft.de>
Subject AW: Protect or disable a cell
Date Wed, 18 Jun 2008 14:44:38 GMT
Hi,

Thanks for your rapid help, Andrew. I am not sure that I have understood you correctly. I
think you mean that I have to implement my own HSSFCellStyle class with an overridden setLocked-method.
But I have no idea how to implement my own style class.
By the way, what is the sense of the setLocked-method in these other HSSFCellStyle classes?
There is no difference when I call the setLocked-method on a HSSFCell after I have called
the setProtect-method with true-parameter (every cell is protected) or false-parameter (no
cell is protected).

Mit freundlichem Gruß 
Sascha Schäfer


-----Ursprüngliche Nachricht-----
Von: Anthony Andrews [mailto:pythonaddict@yahoo.com] 
Gesendet: Dienstag, 17. Juni 2008 13:15
An: POI Users List
Betreff: Re: Protect or disable a cell

Sorry, I forgot the second bit;

Once you have cretaed HSSFCellStyle objects that allow you to lock the contents of certain
cells and applied them to those cells, you need to call the setProtect(boolean) method of
the sheet the cells are on.

--- On Mon, 6/16/08, Anthony Andrews &lt;pythonaddict@yahoo.com&gt; wrote:
From: Anthony Andrews &lt;pythonaddict@yahoo.com&gt;
Subject: Re: Protect or disable a cell
To: "POI Users List" &lt;user@poi.apache.org&gt;
Date: Monday, June 16, 2008, 11:02 PM

Not sure if this is what you want but take a look at the HSSFCellStyle class.
That class includes the setLocked(boolean) method and this may do what you
want. At the very least, it is worth a quick test.

Other than that, you could use an on activation macro if you know in advance
which cells require protection. 

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


Mime
View raw message