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:[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> wrote: From: Anthony Andrews <[EMAIL PROTECTED]> Subject: Re: Protect or disable a cell To: "POI Users List" <[email protected]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
