[]
Returns the workbook write protection options.
WriteProtection WriteProtection { get; }
ReadOnly Property WriteProtection As WriteProtection
WriteProtection protection = workbook.WriteProtection;
protection.WriteReservedBy = "User";
protection.ReadOnlyRecommended = true;
// Get the password from user input by using getPasswordFromSecureSource().
string password = getPasswordFromSecureSource();
protection.WritePassword = password;
bool writeReserved = protection.WriteReserved;
bool passwordMatches = protection.ValidatePassword(password);