Represents one worksheet in a Microsoft Excel workbook.
Constructors
Section titled "Constructors"Worksheet
new Worksheet(a: string, b: Workbook, c: number): Worksheet Returns Worksheet
Properties
Section titled "Properties"$t: Type defaultColumnWidth
Section titled "defaultColumnWidth"defaultColumnWidth: number defaultRowHeight
Section titled "defaultRowHeight"defaultRowHeight: number Inherited from: Sheet
name: string tabColorInfo
Section titled "tabColorInfo"Inherited from: Sheet
tabColorInfo: WorkbookColorInfo Accessors
Section titled "Accessors"displayOptions
Section titled "displayOptions"Gets the object which controls the display of the worksheet.
get displayOptions(): WorksheetDisplayOptions Returns WorksheetDisplayOptions
filterSettings
Section titled "filterSettings"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
hasProtectionPassword
Section titled "hasProtectionPassword"Inherited from: Sheet
Returns a boolean indicating if the Sheet has been protected with a password.
get hasProtectionPassword(): boolean Returns boolean
index
Section titled "index"Gets the zero-based index of this worksheet in its parent [[Workbook.worksheets]] collection.
get index(): number Returns number
isProtected
Section titled "isProtected"Inherited from: Sheet
Returns a boolean indicating if the Worksheet has been protected.
get isProtected(): boolean Returns boolean
printOptions
Section titled "printOptions"Gets the object which controls how the worksheet prints.
get printOptions(): PrintOptions Returns PrintOptions
protection
Section titled "protection"Returns an object that provides information used when the Worksheet has been protected. @see@see@see [[WorksheetProtection]]
get protection(): WorksheetProtection Returns WorksheetProtection
selected
Section titled "selected"Inherited from: Sheet
Gets the value which indicates whether this worksheet is selected.
get selected(): boolean Returns boolean
sheetIndex
Section titled "sheetIndex"Inherited from: Sheet
Gets the zero-based index of this sheet in its parent [[Workbook.sheets]] collection.
get sheetIndex(): number Returns number
sortSettings
Section titled "sortSettings"Exposes methods to identify a region in the worksheet and to apply sort criteria to that region.
get sortSettings(): WorksheetSortSettings Returns WorksheetSortSettings
workbook
Section titled "workbook"Inherited from: Sheet
Gets the [[workbook]] that owns the worksheet. The Workbook that owns the worksheet.
get workbook(): Workbook Returns Workbook
Methods
Section titled "Methods"_ey(a: number, b: number, c: boolean): IEnumerable$1<WorksheetColumn> Parameters
- a:
number - b:
number - c:
boolean
Returns IEnumerable$1<WorksheetColumn>
clearConditionalFormattingData
Section titled "clearConditionalFormattingData"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
columns
Section titled "columns"Gets the column at the specified index.
columns(index: number): WorksheetColumn Parameters
- index:
numberThe zero-based index of the column to get.
Returns WorksheetColumn
conditionalFormats
Section titled "conditionalFormats"Indexer
conditionalFormats(index: number): ConditionBase Parameters
- index:
numberThe zer-based index of an item
Returns ConditionBase
dataTables
Section titled "dataTables"Gets the data table at the specified index in the collection. The data table at the specified index.
dataTables(index: number): WorksheetDataTable Parameters
- index:
numberThe zero-based index of the data table to get.
Returns WorksheetDataTable
dataValidationRules
Section titled "dataValidationRules"Gets or sets the references which have the data validation rule applied to it.
dataValidationRules(rule: DataValidationRule, value: WorksheetReferenceCollection): WorksheetReferenceCollection Parameters
- rule:
DataValidationRuleA data validation rule.
- value:
WorksheetReferenceCollection
Returns WorksheetReferenceCollection
deleteCells
Section titled "deleteCells"Deletes a region of cells.
deleteCells(region: WorksheetRegion, shiftCellsLeft: boolean): void Parameters
- region:
WorksheetRegionThe region to delete
- shiftCellsLeft:
booleanIf 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
getCell
Section titled "getCell"Gets the cell at the specified address or name.
getCell(address: string): WorksheetCell Parameters
- address:
stringThe address or name of the cell.
Returns WorksheetCell
getCellConditionalFormat
Section titled "getCellConditionalFormat"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:
numberThe 0-based index of the WorksheetRow within the [[rows]] collection.
- columnIndex:
numberThe 0-based index of the cell within the [[WorksheetRow]].
Returns CellConditionalFormat
getDefaultColumnWidth
Section titled "getDefaultColumnWidth"Gets the default column width in the specified units.
getDefaultColumnWidth(units: WorksheetColumnWidthUnit): number Parameters
- units:
WorksheetColumnWidthUnitThe units in which the width should be returned.
Returns number
getRegion
Section titled "getRegion"Gets the region at the specified address or name.
getRegion(address: string): WorksheetRegion Parameters
- address:
stringThe address or name of the region.
Returns WorksheetRegion
getRegions
Section titled "getRegions"Gets the regions at the specified address or name.
getRegions(address: string): WorksheetRegion[] Parameters
- address:
stringThe address or name of the region.
Returns WorksheetRegion[]
hideColumns
Section titled "hideColumns"Hides the columns in the specified range.
hideColumns(startIndex: number, count: number): void Parameters
- startIndex:
numberThe index of the first column to hide, or null to start hiding at the first column.
- count:
numberThe 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
hideRows
Section titled "hideRows"Hides the rows in the specified range.
hideRows(startIndex: number, count: number): void Parameters
- startIndex:
numberThe index of the first row to hide, or null to start hiding at the first row.
- count:
numberThe 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
hyperlinks
Section titled "hyperlinks"Gets the hyperlink at the specified index in the collection. The hyperlink at the specified index.
hyperlinks(index: number): WorksheetHyperlink Parameters
- index:
numberThe zero-based index of the hyperlink to get.
Returns WorksheetHyperlink
insertCells
Section titled "insertCells"Inserts a region of cells.
insertCells(region: WorksheetRegion, shiftCellsRight: boolean): void Parameters
- region:
WorksheetRegionThe region to insert
- shiftCellsRight:
booleanIf 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
mergedCellsRegions
Section titled "mergedCellsRegions"Gets the merged cell region at the specified index. The merged cell region at the specified index.
mergedCellsRegions(index: number): WorksheetMergedCellsRegion Parameters
- index:
numberThe zero-based index of the merged cell region to get.
Returns WorksheetMergedCellsRegion
moveToIndex
Section titled "moveToIndex"Moves the worksheet to a new position in the owning workbook's collections of worksheets.
moveToIndex(index: number): void Parameters
- index:
numberThe new 0-based index to where the worksheet should be moved.
Returns void
moveToSheetIndex
Section titled "moveToSheetIndex"Inherited from: Sheet
Moves the sheet to a new position in the owning workbook's collections of sheets.
moveToSheetIndex(index: number): void Parameters
- index:
numberThe new 0-based index to where the sheet should be moved.
Returns void
protect
Section titled "protect"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:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowDeletingColumns]].
- allowDeletingRows:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowDeletingRows]].
- allowEditObjects:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowEditObjects]].
- allowEditScenarios:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowEditScenarios]].
- allowFiltering:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowFiltering]].
- allowFormattingCells:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowFormattingCells]].
- allowFormattingColumns:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowFormattingColumns]].
- allowFormattingRows:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowFormattingRows]].
- allowInsertingColumns:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowInsertingColumns]].
- allowInsertingHyperlinks:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowInsertingHyperlinks]].
- allowInsertingRows:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowInsertingRows]].
- allowSorting:
booleanOptional boolean indicating the new value for the [[WorksheetProtection.allowSorting]].
- allowUsingPivotTables:
booleanOptional 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:
numberThe zero-based index of the row to get.
Returns WorksheetRow
setDefaultColumnWidth
Section titled "setDefaultColumnWidth"Sets the default column width in the specified units.
setDefaultColumnWidth(value: number, units: WorksheetColumnWidthUnit): void Parameters
- value:
numberThe default column width to set on the worksheet, expressed in the specified 'units'.
- units:
WorksheetColumnWidthUnitThe units in which the 'value' is expressed.
Returns void
shapes
Section titled "shapes"Gets the shape at the specified index in the collection. The shape at the specified index.
shapes(index: number): WorksheetShape Parameters
- index:
numberThe zero-based index of the shape to get.
Returns WorksheetShape
sparklineGroups
Section titled "sparklineGroups"Indexer
sparklineGroups(index: number): SparklineGroup Parameters
- index:
numberThe zer-based index of an item
Returns SparklineGroup
tables
Section titled "tables"Gets the [[WorksheetTable]] at the specified index. The WorksheetTable at the specified index.
tables(index: number): WorksheetTable Parameters
- index:
numberThe zero-based index of the WorksheetTable to get.
Returns WorksheetTable
unhideColumns
Section titled "unhideColumns"Unhides the columns in the specified range.
unhideColumns(startIndex: number, count: number): void Parameters
- startIndex:
numberThe index of the first column to unhide, or null to start unhiding at the first column.
- count:
numberThe 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
unhideRows
Section titled "unhideRows"Unhides the rows in the specified range.
unhideRows(startIndex: number, count: number): void Parameters
- startIndex:
numberThe index of the first row to unhide, or null to start unhiding at the first row.
- count:
numberThe 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
unprotect
Section titled "unprotect"Inherited from: Sheet
Removes the Sheet protection.
unprotect(): void Returns void
staticInit
Section titled "staticInit"staticInit(): void