[]
        
(Showing Draft Content)

WriteProtection

Class WriteProtection

java.lang.Object
com.grapecity.documents.excel.WriteProtection

public class WriteProtection extends Object
Provides access to the workbook write protection options.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Gets if the Read Only Recommended option is selected.
    boolean
    Gets 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".
    void
    setReadOnlyRecommended(boolean value)
    Sets if the Read Only Recommended option is selected.
    void
    Sets the protected password to modify the file.
    void
    Sets the name of the user who currently has write permission for the workbook.
    boolean
    Returns true if the specified password is the same as the write-protection password the file was protected with.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WriteProtection

      public WriteProtection()
  • Method Details

    • getWriteReservedBy

      public String 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

      public void setWriteReservedBy(String value)
      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

      public void setWritePassword(String value)
      Sets the protected password to modify the file.
    • validatePassword

      public boolean validatePassword(String password)
      Returns true if the specified password is the same as the write-protection password the file was protected with.
      Parameters:
      password - The specified password..