Package com.grapecity.documents.excel
Class WriteProtection
java.lang.Object
com.grapecity.documents.excel.WriteProtection
Provides access to the workbook write protection options.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets if the Read Only Recommended option is selected.booleanGets whether this workbook is write protected.Gets the name of the user who currently has write permission for the workbook.
If you don't explicitly specify this property, the value will come from the IWorkbook.Author, and if the IWorkbook.Author is empty string or null, the value will be "Document Solution for Excel".voidsetReadOnlyRecommended(boolean value) Sets if the Read Only Recommended option is selected.voidsetWritePassword(String value) Sets the protected password to modify the file.voidsetWriteReservedBy(String value) Sets the name of the user who currently has write permission for the workbook.booleanvalidatePassword(String password) Returns true if the specified password is the same as the write-protection password the file was protected with.
-
Constructor Details
-
WriteProtection
public WriteProtection()
-
-
Method Details
-
getWriteReservedBy
Gets the name of the user who currently has write permission for the workbook.
If you don't explicitly specify this property, the value will come from the IWorkbook.Author, and if the IWorkbook.Author is empty string or null, the value will be "Document Solution for Excel". -
setWriteReservedBy
Sets the name of the user who currently has write permission for the workbook. -
getReadOnlyRecommended
public boolean getReadOnlyRecommended()Gets if the Read Only Recommended option is selected. -
setReadOnlyRecommended
public void setReadOnlyRecommended(boolean value) Sets if the Read Only Recommended option is selected. -
getWriteReserved
public boolean getWriteReserved()Gets whether this workbook is write protected. -
setWritePassword
Sets the protected password to modify the file. -
validatePassword
Returns true if the specified password is the same as the write-protection password the file was protected with.- Parameters:
password- The specified password..
-