Adam, enableLocking() has got nothing to do with password protecting a file.
As you probably know, with the introduction of the xml based file format it
was possible to exercise much finer control over the protection that could
be applied to elements of the worksheet. Thus it was possible to, for
example, prevent the user from changing the style applied to a cell. The
enableLocking() method is a part of this process and is not involved with
password protection.

If you search back through the list, I am fairly certain that this issue has
been addressed, at least in part, by David Fisher who is very much involved
with the development of the API.

Yours

Mark B


Adam Retter-4 wrote:
> 
> Thanks very much - thats is probably just what I need. I personally
> dont have a requirement for XSSF, but it would be nice to have this
> feature for the future.
> 
> On 2 March 2010 07:55, erhard <[email protected]> wrote:
>>
>> Hi,
>>
>> there is the method protectSheet(String password) for HSSFSheet. However,
>> I
>> could not find this functionality for XSSFSheet. It only has the method
>> enableLocking() - without password.
>>
>> I'm desperately looking for a way to password protect Excel sheets in the
>> Office 2007 format.
>>
>> Regards,
>> Erhard
>>
>>
>>
>>> Can anyone tell me if it is possible to create a password protected
>>> Excel Spreadsheet from POI?
>>>
>> --
>> View this message in context:
>> http://old.nabble.com/How-to-Create-password-protected-Excel-spreadsheet-tp27565742p27753015.html
>> Sent from the POI - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> 
> 
> -- 
> Adam Retter
> 
> skype :adam.retter
> http://www.adamretter.org.uk
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-to-Create-password-protected-Excel-spreadsheet-tp27565742p27759057.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to