Using the
Create Input Spreadsheet (in Excel 2010):
HSSF.EventUserModel
, how can I read all Record
s (including CellRecords
) for an XLS file with both Workbook and Worksheet protection?Create Input Spreadsheet (in Excel 2010):
- Create new Blank workbook.
- Set value of A1 to number: 50
- Set value of A2 to string: fifty
- Set value of A3 to formula: =25*2
- Review (ribbon) -> Protect Sheet -> Password: pass1
- Review (ribbon) -> Protect Workbook -> Password: pass1
-
File (ribbon) ->Save As... -> Save as type: Excel 97-2003 Workbook
- Setting
NPOI.HSSF.Record.Crypto.Biff8EncryptionKey.CurrentUserPassword = "pass1";
did not work. - The
ProcessRecord( )
function catches aPasswordRecord
(link), but I can't find any documentation on how to properly handle it. -
Perhaps, the
EncryptionInfo
orDecryptor
classes may be of some use.