public static final class SheetProtection.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SheetProtection |
build()
Returns an instance of SheetProtection created from the fields set on this builder.
|
void |
clear()
Resets the builder to its initial, empty state.
|
SheetProtection.Builder |
setAllowDeletingColumns(boolean allowDeletingColumns)
Sets true to allow user to delete columns on the protected sheet.
|
SheetProtection.Builder |
setAllowDeletingRows(boolean allowDeletingRows)
Sets true to allow user to delete rows on the protected sheet.
|
SheetProtection.Builder |
setAllowFiltering(boolean allowFiltering)
Sets true to allow user to set filters on the protected sheet
|
SheetProtection.Builder |
setAllowFormattingCells(boolean allowFormattingCells)
Sets true to allow user to format any cell on the protected sheet.
|
SheetProtection.Builder |
setAllowFormattingColumns(boolean allowFormattingColumns)
Sets true to allow user to format any columns on the protected sheet.
|
SheetProtection.Builder |
setAllowFormattingRows(boolean allowFormattingRows)
Sets true to allow user to format any rows on the protected sheet.
|
SheetProtection.Builder |
setAllowInsertingColumns(boolean allowInsertingColumns)
Sets true to allow user to insert columns on the protected sheet.
|
SheetProtection.Builder |
setAllowInsertingHyperlinks(boolean allowInsertingHyperlinks)
Sets true to allow user to insert hyperlinks on the protected sheet.
|
SheetProtection.Builder |
setAllowInsertingRows(boolean allowInsertingRows)
Sets true to allow user to insert rows on the protected sheet.
|
SheetProtection.Builder |
setAllowSelectLockedCells(boolean allowSelectLockedCells)
Sets true to allow select locked cells.
|
SheetProtection.Builder |
setAllowSelectUnlockedCells(boolean allowSelectUnlockedCells)
Sets true to allow select unlocked cells
|
SheetProtection.Builder |
setAllowSorting(boolean allowSorting)
Sets true to allow user to sort on the protected sheet.
|
SheetProtection.Builder |
setAllowUsingPivotTables(boolean allowUsingPivotTables)
Sets true to allow user to use pivot table reports on the protected sheet.
|
SheetProtection.Builder |
setDrawingObjects(boolean drawingObjects)
Sets the drawingObjects to true to protect objects.
|
SheetProtection.Builder |
setPassword(String password)
Sets the case-sensitive password for the sheet; null or empty string
means protect the sheet without password.
|
SheetProtection.Builder |
setScenarios(boolean scenarios)
Sets true to protect scenarios.
|
SheetProtection.Builder |
setUserInterfaceOnly(boolean userInterfaceOnly)
Sets true to forbid user to modify this the through
UI e.g.
|
public SheetProtection.Builder setPassword(String password)
Default to null
password
- public SheetProtection.Builder setDrawingObjects(boolean drawingObjects)
Default to true
drawingObjects
- public SheetProtection.Builder setScenarios(boolean scenarios)
Default to true
scenarios
- public SheetProtection.Builder setUserInterfaceOnly(boolean userInterfaceOnly)
Default to false
userInterfaceOnly
- public SheetProtection.Builder setAllowFormattingCells(boolean allowFormattingCells)
Default to false
allowFormattingCells
- public SheetProtection.Builder setAllowFormattingColumns(boolean allowFormattingColumns)
Default to false
allowFormattingColumns
- public SheetProtection.Builder setAllowFormattingRows(boolean allowFormattingRows)
Default to false
allowFormattingRows
- public SheetProtection.Builder setAllowInsertingColumns(boolean allowInsertingColumns)
Default to false
allowInsertingColumns
- public SheetProtection.Builder setAllowInsertingRows(boolean allowInsertingRows)
Default to false
allowInsertingRows
- public SheetProtection.Builder setAllowInsertingHyperlinks(boolean allowInsertingHyperlinks)
Default to false
allowInsertingHyperlinks
- public SheetProtection.Builder setAllowDeletingColumns(boolean allowDeletingColumns)
Default to false
allowDeletingColumns
- public SheetProtection.Builder setAllowDeletingRows(boolean allowDeletingRows)
Default to false
allowDeletingRows
- public SheetProtection.Builder setAllowSorting(boolean allowSorting)
Default to false
allowSorting
- public SheetProtection.Builder setAllowFiltering(boolean allowFiltering)
Default to false
allowFiltering
- public SheetProtection.Builder setAllowUsingPivotTables(boolean allowUsingPivotTables)
Default to false
allowUsingPivotTables
- public SheetProtection.Builder setAllowSelectLockedCells(boolean allowSelectLockedCells)
Default to false
allowSelectLockedCells
- public SheetProtection.Builder setAllowSelectUnlockedCells(boolean allowSelectUnlockedCells)
allowSelectUnlockedCells
- public SheetProtection build()
public void clear()
Copyright © 2018. All rights reserved.