Base class for a sheet in a Microsoft Excel workbook.

Hierarchy

Hierarchy

Implements

  • IWorkbookProvider

Constructors

  • Parameters

    Returns Sheet

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get hasProtectionPassword(): boolean
  • Returns a boolean indicating if the Sheet has been protected with a password.

    When protecting a Sheet, a password is optional. The HasProtectionPassword will return true if the Sheet is currently protected (see [[isProtected]]) and a password was specified when it was protected.

    See

    • [[isProtected]] @see@see [[sheetProtection]]
    • [[Worksheet.protect]]
    • [[unprotect]]

    Returns boolean

  • get isProtected(): boolean
  • Returns a boolean indicating if the Worksheet has been protected.

    The IsProtected property will return true if the Worksheet is currently protected. When a Worksheet is protected only unprotected cells may be edited. In addition, other operations may be limited based on the properties of the [[WorksheetProtection]] which may be accessed using the Protection property.

    See

    • [[hasProtectionPassword]]
    • [[sheetProtection]]
    • [[WorksheetProtection]] @see@see [[Worksheet.protection]]
    • [[Chartsheet.protection]]
    • [[unprotect]]

    Returns boolean

  • get name(): string
  • Gets or sets the sheet name.

    The sheet name is case-insensitively unique in the workbook.

    The sheet name is shown in the tab for the worksheet. In addition, the worksheet name can be used by formulas from other worksheets to refer to cells in this worksheet.

    The sheet name.

    Throws

    [[ArgumentNullException]] The value assigned is null or empty.

    Throws

    [[ArgumentException]] The value assigned contains the invalid characters: ':', '', '/', '?', '*', '[', or ']'.

    Throws

    [[ArgumentException]] The value assigned exceeds 31 characters in length.

    Throws

    [[ArgumentException]] The value assigned is being used as the name of another sheet (sheet names are case-insensitively compared).

    Returns string

  • set name(a): void
  • Parameters

    • a: string

    Returns void

  • get selected(): boolean
  • Gets the value which indicates whether this worksheet is selected.

    If the worksheet has been removed from its parent [[Workbook.worksheets]] collection, this will always return False.

    The value which indicates whether this worksheet is selected.

    See

    • [[WindowOptions]]

    Returns boolean

  • get sheetIndex(): number
  • Gets the zero-based index of this sheet in its parent [[Workbook.sheets]] collection.

    Negative one indicates the sheet has been removed from its parent collection.

    The zero-based index of this sheet in its parent Sheets collection.

    See

    • [[SheetCollection.indexOf]]
    • [[moveToSheetIndex]]

    Returns number

  • get tabColorInfo(): WorkbookColorInfo
  • Gets or sets the [[WorkbookColorInfo]] to use for the associated sheet's tab in the tab bar of Microsoft Excel.

    If the tab bar is not visible, this color will not be seen.

    The WorkbookColorInfo to use for the associated sheet's tab in the tab bar of Microsoft Excel.

    See

    [[WindowOptions.tabBarVisible]]

    Returns WorkbookColorInfo

  • set tabColorInfo(a): void
  • Parameters

    Returns void

  • get type(): SheetType
  • Returns a value indicating the type of sheet

    Returns SheetType

  • get workbook(): Workbook
  • Gets the [[workbook]] that owns the worksheet. The Workbook that owns the worksheet.

    Returns Workbook

Methods

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Returns Base

  • Moves the sheet to a new position in the owning workbook's collections of sheets.

    Throws

    [[InvalidOperationException]] The sheet has previously been removed from its workbook.

    Throws

    [[ArgumentOutOfRangeException]] 'index' is less than 0 or greater than or equal to the number of sheets in the owning workbook.

    See

    • [[Workbook.sheets]]
    • [[SheetCollection.indexOf]]
    • [[sheetIndex]]

    Parameters

    • index: number

      The new 0-based index to where the sheet should be moved.

    Returns void

  • Removes the Sheet protection.

    See

    • [[isProtected]]
    • [[hasProtectionPassword]]
    • [[Worksheet.protect]]

    Returns void

  • 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 any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Returns void