XLS
Create EncryptionInfo class object.
Get the Encryptor object using getEncryptor() method.
Set the password using confirmPassword()
Open the xlsx file using OPCPackage.open() in READ_WRITE mode.
Get the output stream using encryptor and then save it.
Write the encrypted data to the file.
1.
2.
3.
4.
5.
6.