com.groupdocs.editor.options

Class WorksheetProtection



  • public final class WorksheetProtection
    extends Object

    Encapsulates worksheet protection options, which allow to protect a worksheet in the output Spreadsheet document from modification of specified type with a specified password.


    Most of Spreadsheet formats like XLSX allows to protect a worksheet from editing with password. This class allows to enable such protection and specify its options.

    • Constructor Detail

      • WorksheetProtection

        public WorksheetProtection()
    • Method Detail

      • convertToAsposeCells

        public static int convertToAsposeCells(byte protectionType)
      • getPassword

        public final String getPassword()

        Password, which is used for protecting a worksheet. If NULL or empty string, the protection will not be applied.

      • getProtectionType

        public final byte getProtectionType()

        Allows to specify a type of worksheet protection. By default is 'None' - protection is not applied.

      • setPassword

        public final void setPassword(String value)

        Password, which is used for protecting a worksheet. If NULL or empty string, the protection will not be applied.

      • setProtectionType

        public final void setProtectionType(byte value)

        Allows to specify a type of worksheet protection. By default is 'None' - protection is not applied.