Class Sheet

Base class for a sheet in a Microsoft Excel workbook.

Hierarchy

Implements

  • IWorkbookProvider

Constructors

constructor

  • Parameters

    Returns Sheet

Properties

$type

$type: Type

Static $t

$t: Type = markType(Sheet, 'Sheet', (<any>Base).$, [IWorkbookProvider_$type])

Static nextHashCode

nextHashCode: number

Accessors

hasProtectionPassword

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

    see

    Worksheet.protect

    see

    unprotect

    Returns boolean

isProtected

  • 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

    see

    [[sheetProtection]]

    see

    WorksheetProtection

    see@see

    Worksheet.protection

    see

    Chartsheet.protection

    see

    unprotect

    Returns boolean

name

  • get name(): string
  • set name(a: string): void
  • 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

  • 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.

    Parameters

    • a: string

    Returns void

selected

  • 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

    see

    Returns boolean

sheetIndex

  • 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

    see

    moveToSheetIndex

    Returns number

tabColorInfo

  • 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

  • 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.

    Parameters

    Returns void

type

  • Returns a value indicating the type of sheet

    Returns SheetType

workbook

  • Gets the workbook that owns the worksheet. The Workbook that owns the worksheet.

    Returns Workbook

Methods

equals

  • equals(other: any): boolean
  • Parameters

    • other: any

    Returns boolean

getHashCode

  • getHashCode(): number
  • Returns number

memberwiseClone

  • memberwiseClone(): Base
  • Returns Base

moveToSheetIndex

  • moveToSheetIndex(index: number): void
  • 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

    see

    SheetCollection.indexOf

    see

    sheetIndex

    Parameters

    • index: number

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

    Returns void

unprotect

  • unprotect(): void

Static compare

  • compare(item1: any, item2: any): number
  • Parameters

    • item1: any
    • item2: any

    Returns number

Static compareSimple

  • compareSimple(item1: any, item2: any): number
  • Parameters

    • item1: any
    • item2: any

    Returns number

Static equalsSimple

  • equalsSimple(item1: any, item2: any): boolean
  • Parameters

    • item1: any
    • item2: any

    Returns boolean

Static equalsStatic

  • equalsStatic(a: any, b: any): boolean
  • Parameters

    • a: any
    • b: any

    Returns boolean

Static getArrayOfProperties

  • getArrayOfProperties(obj: any): any[]
  • Parameters

    • obj: any

    Returns any[]

Static getArrayOfValues

  • getArrayOfValues(obj: any): any[]
  • Parameters

    • obj: any

    Returns any[]

Static getHashCodeStatic

  • getHashCodeStatic(obj: any): number
  • Parameters

    • obj: any

    Returns number

Static referenceEquals

  • referenceEquals(a: any, b: any): boolean
  • Parameters

    • a: any
    • b: any

    Returns boolean

Static staticInit

  • staticInit(): void
  • Returns void