Provides information about the types of changes that are disabled when the associated Worksheet is protected.

When a Worksheet is protected, the contents of unprotected cells may be edited by the end-user. One way to unprotect a cell is to change the IWorksheetCellFormat.locked property to false. Such cells may be edited by all users. Another way to unprotect cells is using the allowedEditRanges. This is a collection of WorksheetProtectedRange instances that define a range of cells that is optionally protected by another password. For any other cells, the Worksheet would need to be unprotected first. A Worksheet may be programatically unprotected using the Worksheet.Unprotect() method.

The selectionMode property is used to control which cells the end user may select when the Worksheet has been protected. This property may be set before or after protecting a Worksheet.

Many of the other properties of this class are read-only (e.g. allowDeletingColumns). The state of these properties are optionally set when the Worksheet is protected (e.g. using the Worksheet.protect method.

@see@see@see Worksheet.protection

See

Hierarchy

Hierarchy

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get allowDeletingColumns(): boolean
  • Returns a boolean indicating if the deletion of columns is allowed in a protected worksheet.

    See

    Returns boolean

  • set allowDeletingColumns(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get allowDeletingRows(): boolean
  • Returns a boolean indicating if the deletion of rows is allowed in a protected worksheet.

    See

    Returns boolean

  • set allowDeletingRows(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get allowEditObjects(): boolean
  • Returns a boolean indicating if objects such as shapes, comments, charts and controls may be created or changed when the worksheet is protected.

    Returns boolean

  • set allowEditObjects(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get allowEditScenarios(): boolean
  • Returns a boolean indicating if existing scenarios are protected when the worksheet is protected.

    Returns boolean

  • set allowEditScenarios(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get allowFiltering(): boolean
  • Returns a boolean indicating if the user may use an auto filter created before the worksheet was protected.

    Returns boolean

  • set allowFiltering(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get allowFormattingCells(): boolean
  • Returns a boolean indicating if the user may change the formatting of cells in a protected worksheet.

    Returns boolean

  • set allowFormattingCells(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get allowFormattingColumns(): boolean
  • Returns a boolean indicating if the user may change column information such as its width or visibility in a protected worksheet.

    Returns boolean

  • set allowFormattingColumns(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get allowFormattingRows(): boolean
  • Returns a boolean indicating if the user may change row information such as its height or visibility in a protected worksheet.

    Returns boolean

  • set allowFormattingRows(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get allowInsertingColumns(): boolean
  • Returns a boolean indicating if the user may insert columns in a protected worksheet.

    See

    Returns boolean

  • set allowInsertingColumns(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • Returns a boolean indicating if the user may insert hyperlinks in unlocked cells in a protected worksheet.

    Returns boolean

  • Parameters

    • a: boolean

    Returns void

  • get allowInsertingRows(): boolean
  • Returns a boolean indicating if the user may insert rows in a protected worksheet.

    See

    Returns boolean

  • set allowInsertingRows(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get allowSorting(): boolean
  • Returns a boolean indicating if the sorting is allowed in a protected worksheet.

    Returns boolean

  • set allowSorting(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get allowUsingPivotTables(): boolean
  • Returns a boolean indicating if the user can change pivot tables in a protected worksheet.

    Returns boolean

  • set allowUsingPivotTables(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

Methods

  • Gets the range at the specified index in the collection. The range at the specified index.

    Throws

    ArgumentOutOfRangeException 'index' is less than zero or 'index' is greater than or equal to count.

    Parameters

    • index: number

      The zero-based index of the range to get.

    Returns WorksheetProtectedRange

  • Returns a collection of WorksheetProtectedRange instances that define which locked ranges of cells may be edited in a protected worksheet.

    When a Worksheet is protected the only cells that may be edited are those whose IWorksheetCellFormat.locked property has been set to false. All other cells are not editable by default. One can make additional cells or ranges of cells editable via this collection. The WorksheetProtectedRange instances specify the range to which it applies and optionally a password that may be used to unlock that range.

    Returns WorksheetProtectedRangeCollection

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean