Represents one worksheet in a Microsoft Excel workbook.

Worksheet

new Worksheet(a: string, b: Workbook, c: number): Worksheet

Returns Worksheet

$t: Type
defaultColumnWidth: number
defaultRowHeight: number

Inherited from: Sheet

name: string

Inherited from: Sheet

tabColorInfo: WorkbookColorInfo

Gets the object which controls the display of the worksheet.

get displayOptions(): WorksheetDisplayOptions

Returns WorksheetDisplayOptions

Exposes methods to identify a region in the worksheet and to apply filters and optionally sort criteria to that region.

get filterSettings(): WorksheetFilterSettings

Returns WorksheetFilterSettings

Inherited from: Sheet

Returns a boolean indicating if the Sheet has been protected with a password.

get hasProtectionPassword(): boolean

Returns boolean

Gets the zero-based index of this worksheet in its parent [[Workbook.worksheets]] collection.

get index(): number

Returns number

Inherited from: Sheet

Returns a boolean indicating if the Worksheet has been protected.

get isProtected(): boolean

Returns boolean

Gets the object which controls how the worksheet prints.

get printOptions(): PrintOptions

Returns PrintOptions

Returns an object that provides information used when the Worksheet has been protected. @see@see@see [[WorksheetProtection]]

get protection(): WorksheetProtection

Returns WorksheetProtection

Inherited from: Sheet

Gets the value which indicates whether this worksheet is selected.

get selected(): boolean

Returns boolean

Inherited from: Sheet

Gets the zero-based index of this sheet in its parent [[Workbook.sheets]] collection.

get sheetIndex(): number

Returns number

Exposes methods to identify a region in the worksheet and to apply sort criteria to that region.

get sortSettings(): WorksheetSortSettings

Returns WorksheetSortSettings

Returns a value indicating the type of sheet

get type(): SheetType

Returns SheetType

Inherited from: Sheet

Gets the [[workbook]] that owns the worksheet. The Workbook that owns the worksheet.

get workbook(): Workbook

Returns Workbook

_ey(a: number, b: number, c: boolean): IEnumerable$1<WorksheetColumn>

Parameters

  • a: number
  • b: number
  • c: boolean

Returns IEnumerable$1<WorksheetColumn>

Clears all conditional formatting rules from the [[Worksheet]] so they do not get saved. Note: this method is obsolete. Use the Worksheet.ConditionalFormats.Clear() method instead.

clearConditionalFormattingData(): void

Returns void

Gets the column at the specified index.

columns(index: number): WorksheetColumn

Parameters

  • index: number

    The zero-based index of the column to get.

Returns WorksheetColumn

Indexer

conditionalFormats(index: number): ConditionBase

Parameters

  • index: number

    The zer-based index of an item

Returns ConditionBase

Gets the data table at the specified index in the collection. The data table at the specified index.

dataTables(index: number): WorksheetDataTable

Parameters

  • index: number

    The zero-based index of the data table to get.

Returns WorksheetDataTable

Gets or sets the references which have the data validation rule applied to it.

dataValidationRules(rule: DataValidationRule, value: WorksheetReferenceCollection): WorksheetReferenceCollection

Parameters

Returns WorksheetReferenceCollection

Deletes a region of cells.

deleteCells(region: WorksheetRegion, shiftCellsLeft: boolean): void

Parameters

  • region: WorksheetRegion

    The region to delete

  • shiftCellsLeft: boolean

    If true will shift cells left from the right of the region to occupy the deleted region, otherwise will shift cells up from below the region.

Returns void

Gets the cell at the specified address or name.

getCell(address: string): WorksheetCell

Parameters

  • address: string

    The address or name of the cell.

Returns WorksheetCell

Gets the cell conditional format for the cell at the specified row and column index. Note: if the cell is contained in one or more conditional format regions but doesn't match any of thse criteria an instance of [[CellConditionalFormat]] will still be returned but its [[CellConditionalFormat.hasConditionFormatting]] property will return null. However, if the sell is not contained in any conditional format region then this method will return null.

getCellConditionalFormat(rowIndex: number, columnIndex: number): CellConditionalFormat

Parameters

  • rowIndex: number

    The 0-based index of the WorksheetRow within the [[rows]] collection.

  • columnIndex: number

    The 0-based index of the cell within the [[WorksheetRow]].

Returns CellConditionalFormat

Gets the default column width in the specified units.

getDefaultColumnWidth(units: WorksheetColumnWidthUnit): number

Parameters

Returns number

Gets the region at the specified address or name.

getRegion(address: string): WorksheetRegion

Parameters

  • address: string

    The address or name of the region.

Returns WorksheetRegion

Gets the regions at the specified address or name.

getRegions(address: string): WorksheetRegion[]

Parameters

  • address: string

    The address or name of the region.

Returns WorksheetRegion[]

Hides the columns in the specified range.

hideColumns(startIndex: number, count: number): void

Parameters

  • startIndex: number

    The index of the first column to hide, or null to start hiding at the first column.

  • count: number

    The number of columns to hide. If null, a single column will be hidden when 'startIndex' is specified and otherwise, all columns will be hidden.

Returns void

Hides the rows in the specified range.

hideRows(startIndex: number, count: number): void

Parameters

  • startIndex: number

    The index of the first row to hide, or null to start hiding at the first row.

  • count: number

    The number of rows to hide. If null, a single row will be hidden when 'startIndex' is specified and otherwise, all rows will be hidden.

Returns void

Gets the hyperlink at the specified index in the collection. The hyperlink at the specified index.

hyperlinks(index: number): WorksheetHyperlink

Parameters

  • index: number

    The zero-based index of the hyperlink to get.

Returns WorksheetHyperlink

Inserts a region of cells.

insertCells(region: WorksheetRegion, shiftCellsRight: boolean): void

Parameters

  • region: WorksheetRegion

    The region to insert

  • shiftCellsRight: boolean

    If true will shift existing cells right to make room for the newly inserted cells, otherwise will shift existing cells down below the region.

Returns void

Gets the merged cell region at the specified index. The merged cell region at the specified index.

mergedCellsRegions(index: number): WorksheetMergedCellsRegion

Parameters

  • index: number

    The zero-based index of the merged cell region to get.

Returns WorksheetMergedCellsRegion

Moves the worksheet to a new position in the owning workbook's collections of worksheets.

moveToIndex(index: number): void

Parameters

  • index: number

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

Returns void

Inherited from: Sheet

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

moveToSheetIndex(index: number): void

Parameters

  • index: number

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

Returns void

Protects the worksheet without a password.

protect(allowDeletingColumns: boolean, allowDeletingRows: boolean, allowEditObjects: boolean, allowEditScenarios: boolean, allowFiltering: boolean, allowFormattingCells: boolean, allowFormattingColumns: boolean, allowFormattingRows: boolean, allowInsertingColumns: boolean, allowInsertingHyperlinks: boolean, allowInsertingRows: boolean, allowSorting: boolean, allowUsingPivotTables: boolean): void

Parameters

  • allowDeletingColumns: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowDeletingColumns]].

  • allowDeletingRows: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowDeletingRows]].

  • allowEditObjects: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowEditObjects]].

  • allowEditScenarios: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowEditScenarios]].

  • allowFiltering: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowFiltering]].

  • allowFormattingCells: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowFormattingCells]].

  • allowFormattingColumns: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowFormattingColumns]].

  • allowFormattingRows: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowFormattingRows]].

  • allowInsertingColumns: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowInsertingColumns]].

  • allowInsertingHyperlinks: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowInsertingHyperlinks]].

  • allowInsertingRows: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowInsertingRows]].

  • allowSorting: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowSorting]].

  • allowUsingPivotTables: boolean

    Optional boolean indicating the new value for the [[WorksheetProtection.allowUsingPivotTables]]. @see@see@see [[protection]]

Returns void

Gets the row at the specified index.

rows(index: number): WorksheetRow

Parameters

  • index: number

    The zero-based index of the row to get.

Returns WorksheetRow

Sets the default column width in the specified units.

setDefaultColumnWidth(value: number, units: WorksheetColumnWidthUnit): void

Parameters

  • value: number

    The default column width to set on the worksheet, expressed in the specified 'units'.

  • units: WorksheetColumnWidthUnit

    The units in which the 'value' is expressed.

Returns void

Gets the shape at the specified index in the collection. The shape at the specified index.

shapes(index: number): WorksheetShape

Parameters

  • index: number

    The zero-based index of the shape to get.

Returns WorksheetShape

Indexer

sparklineGroups(index: number): SparklineGroup

Parameters

  • index: number

    The zer-based index of an item

Returns SparklineGroup

Gets the [[WorksheetTable]] at the specified index. The WorksheetTable at the specified index.

tables(index: number): WorksheetTable

Parameters

  • index: number

    The zero-based index of the WorksheetTable to get.

Returns WorksheetTable

Unhides the columns in the specified range.

unhideColumns(startIndex: number, count: number): void

Parameters

  • startIndex: number

    The index of the first column to unhide, or null to start unhiding at the first column.

  • count: number

    The number of columns to unhide. If null, a single column will be unhidden when 'startIndex' is specified and otherwise, all columns will be unhidden.

Returns void

Unhides the rows in the specified range.

unhideRows(startIndex: number, count: number): void

Parameters

  • startIndex: number

    The index of the first row to unhide, or null to start unhiding at the first row.

  • count: number

    The number of rows to unhide. If null, a single row will be unhidden when 'startIndex' is specified and otherwise, all rows will be unhidden.

Returns void

Inherited from: Sheet

Removes the Sheet protection.

unprotect(): void

Returns void

staticInit(): void

Returns void