On Thu, 3 Apr 2008, Borisoff, Victor wrote:
While on this topic, we have Excel document and want to protect it from modification. POI provides something to mart each cell "protected". But this can be easily changed back. Is there is something to make excel document un-modifiable with the password?

You can write protect a workbook without encrypting it:
http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFWorkbook.html#writeProtectWorkbook(java.lang.String,%20java.lang.String)


The last time I looked at it, document encryption stuff was just a mess. There was a dozen different algorithms to select from, and all but one were microsoft proprietary algorithms / proprietary versions of standard algorithms.

It might be possible to decrypt / encrypt documents that are really stored as rc4, and not as one of the microsoft nobbled rc4s, assuming we knew how to turn the password string into key bytes. Page 119 of the excel binary specs talks about a FilePass record (2fh), and bizarely points you at the ooxml specs for more information. If someone was interested in adding support, that would seem to be the place to start

Nick

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

Reply via email to