类 WriteProtection

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

public class WriteProtection extends Object
Provides access to the workbook write protection options.
  • 构造器详细资料

    • WriteProtection

      public WriteProtection()
  • 方法详细资料

    • 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 "GcExcel".
    • 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.
      参数:
      password - The specified password..