Cell

Overview

Cell is a class in Aspose.Cells FOSS for TypeScript.

Cell constructor(row, col, value?) creates a cell positioned at the given row and column, optionally initializing its value.

This class declares 8 methods for Cell objects in TypeScript programs. Available methods include: constructor, putValue, setFormula, setHyperlink, setSharedStrings, setStyle, setStyleIndex, toXml. Public members are accessible to any TypeScript application after installing the Aspose.Cells FOSS for TypeScript package. Properties: col, formula, hyperlink, ref, row, sharedStringMap, and 3 more.

Properties

NameTypeAccessDescription
sharedStringMap: Map<string, number>Read/WriteGets or sets the shared string map.
row-ReadGets the row.
col-ReadGets the col.
ref-ReadGets the ref.
valueCellValueRead/WriteGets the value.
formulastring | undefinedRead/WriteGets the formula.
styleStyle | undefinedRead/WriteGets the style.
styleIndexnumber | undefinedReadGets the style index.
hyperlinkstring | undefinedReadGets the hyperlink.

Methods

SignatureDescription
setSharedStrings(strings: string[])Sets the shared strings value.
constructor(row: number, col: number, value: CellValue)Calls constructor(row, col, value) on this Cell instance.
putValue(value: CellValue)Assigns a primitive, Date, or boolean to the cell and returns the Cell instance for method chaining
setFormula(formula: string)Sets the formula value.
setStyle(style: Style)Sets the style value.
setStyleIndex(index: number)Sets the style index value.
setHyperlink(url: string)Sets the hyperlink value.
toXml() → stringGenerates the XML representation of the cell, including its reference, value, type, formula, style index, and hyperlink when present

See Also

 English