Verify Password Used to Protect the Worksheet
Contents
[
Hide
]
Aspose.Cells APIs have enhanced the Protection class by introducing some useful properties & methods. One such method is the verifyPassword which allows specifying a password as an instance of String and verifies if the same password has been used to protect the Worksheet.
Verify Password Used to Protect the Worksheet
The Protection.verifyPassword method returns true if the specified password matches with the password used to protect the given worksheet, false if the specified password does not match. Following piece of code uses the Protection.verifyPassword method in conjunction with Protection.isProtectedWithPassword property to detect the password protection, and verifies the password.