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.
Constructor and Description |
---|
WorksheetProtection()
Creates new instance with default parameters.
|
WorksheetProtection(byte protectionType,
String password)
Creates new instance with specified worksheet protection type and
password
|
Modifier and Type | Method and Description |
---|---|
String |
getPassword()
Password, which is used for protecting a worksheet.
|
byte |
getProtectionType()
Allows to specify a type of worksheet protection.
|
void |
setPassword(String value)
Password, which is used for protecting a worksheet.
|
void |
setProtectionType(byte value)
Allows to specify a type of worksheet protection.
|
public WorksheetProtection()
Creates new instance with default parameters. If not modified and passed to SpreadsheetSaveOptions, no worksheet protection will be applied
public WorksheetProtection(byte protectionType, String password)
Creates new instance with specified worksheet protection type and password
protectionType
- Type of worksheet protectionpassword
- Password, that locks the protectionpublic final String getPassword()
Password, which is used for protecting a worksheet. If NULL or empty string, the protection will not be applied.
public final byte getProtectionType()
Allows to specify a type of worksheet protection. By default is 'None' - protection is not applied.
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.
public final void setProtectionType(byte value)
Allows to specify a type of worksheet protection. By default is 'None' - protection is not applied.