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