Represents a cell in a Microsoft Excel worksheet.
Constructors
Section titled "Constructors"WorksheetCell
new WorksheetCell(a: WorksheetRow, b: number): WorksheetCell Returns WorksheetCell
Properties
Section titled "Properties"$t: Type comment
Section titled "comment"comment: WorksheetCellComment dataValidationRule
Section titled "dataValidationRule"dataValidationRule: DataValidationRule value
Section titled "value"value: any Accessors
Section titled "Accessors"associatedDataTable
Section titled "associatedDataTable"Gets the data table to which the cell belongs.
get associatedDataTable(): WorksheetDataTable Returns WorksheetDataTable
associatedMergedCellsRegion
Section titled "associatedMergedCellsRegion"Gets the merged cells region which contains the cell, or null if the cell is not merged.
get associatedMergedCellsRegion(): WorksheetMergedCellsRegion Returns WorksheetMergedCellsRegion
associatedTable
Section titled "associatedTable"Gets the [[WorksheetTable]] to which this cell belongs.
get associatedTable(): WorksheetTable Returns WorksheetTable
cellFormat
Section titled "cellFormat"Gets the cell formatting for this cell.
get cellFormat(): IWorksheetCellFormat Returns IWorksheetCellFormat
columnIndex
Section titled "columnIndex"Gets the column index of the cell. The column index of the cell.
get columnIndex(): number Returns number
formula
Section titled "formula"hasCellFormat
Section titled "hasCellFormat"Gets the value which indicates whether the cell's format has been initialized yet.
get hasCellFormat(): boolean Returns boolean
hasComment
Section titled "hasComment"Get the value indicating whether the cell has an associated comment.
get hasComment(): boolean Returns boolean
rowIndex
Section titled "rowIndex"Gets the row index of the cell. The row index of the cell.
get rowIndex(): number Returns number
worksheet
Section titled "worksheet"Gets the worksheet to which the cell belongs. The worksheet to which the cell belongs.
get worksheet(): Worksheet Returns Worksheet
Methods
Section titled "Methods"applyFormula
Section titled "applyFormula"Applies a formula to the cell.
applyFormula(value: string): void Parameters
- value:
stringThe formula to parse and apply to the cell.
Returns void
clearComment
Section titled "clearComment"Removes the comment associated with the cell.
clearComment(): void Returns void
equals
Section titled "equals"Determines whether the specified object is another [[WorksheetCell]] instance which refers to the same location on the same worksheet as this cell.
equals(obj: any): boolean Parameters
- obj:
anyThe instance to check for equality.
Returns boolean
getBoundsInTwips
Section titled "getBoundsInTwips"Gets the bounds of the cell in twips (1/20th of a point).
getBoundsInTwips(): IgRect Returns IgRect
getHashCode
Section titled "getHashCode"Gets the hash code of the [[WorksheetCell]].
getHashCode(): number Returns number
getHyperlink
Section titled "getHyperlink"Gets the effective hyperlink on the cell.
getHyperlink(): WorksheetHyperlink Returns WorksheetHyperlink
getResolvedCellFormat
Section titled "getResolvedCellFormat"Gets the resolved cell formatting for this cell.
getResolvedCellFormat(): IWorksheetCellFormat Returns IWorksheetCellFormat
getText
Section titled "getText"Gets the text displayed in the cell.
getText(): string Returns string
toString
Section titled "toString"Gets the string representation of the address of the cell.
toString(): string Returns string
validateValue
Section titled "validateValue"Returns a boolean indicating if the value of the cell is valid considering the associated [[dataValidationRule]]
validateValue(): boolean Returns boolean
getCellAddressString
Section titled "getCellAddressString"Gets the string representation of the address of the cell.
getCellAddressString(worksheetRow: WorksheetRow, columnIndex: number, cellReferenceMode: CellReferenceMode, includeWorksheetName: boolean): string Parameters
- worksheetRow:
WorksheetRowThe WorksheetRow of the cell.
- columnIndex:
numberThe index of the column of the cell.
- cellReferenceMode:
CellReferenceModeThe mode used to generate cell references.
- includeWorksheetName:
booleanThe value indicating whether to include the worksheet name in the cell address.
Returns string
isCellTypeSupported
Section titled "isCellTypeSupported"Returns True if a particular type of value can be exported to excel.
isCellTypeSupported(cellType: Type): boolean Parameters
- cellType:
TypeThe type to test.