Represents a formula for a cell or group of cells.

Formula

new Formula(a: number, b: number, c: FormulaType): Formula

Returns Formula

$t: Type

Applies the formula to all specified regions of cells.

applyTo(regions: WorksheetRegion[]): void

Parameters

Returns void

Converts the formula to a string representation, similar to the string with which it was created. This uses the [[CellReferenceMode]] with which the formula was created to create cell reference strings.

toString(): string

Returns string

Determines whether two [[Formula]] instances are equal using the specified cell reference mode. This essentially performs a case-insensitive string comparison, ignoring the white space in the formula.

areEqual(formulaA: Formula, formulaB: Formula, cellReferenceMode: CellReferenceMode): boolean

Parameters

  • formulaA: Formula

    The first Formula to compare.

  • formulaB: Formula

    The second Formula to compare.

  • cellReferenceMode: CellReferenceMode

    The cell reference mode to use when comparing the two formulas.

Returns boolean

Parses the specified formula value and returns the formula which was created from it.

parse(value: string, cellReferenceMode: CellReferenceMode): Formula

Parameters

  • value: string

    The string which defines the formula to parse.

  • cellReferenceMode: CellReferenceMode

    The mode used to interpret cell references in the formula.

Returns Formula

staticInit(): void

Returns void