SheetXL - v0.3.20
    Preparing search index...

    Class StubbedFormulaContext

    Default implementation of the IFormulaContext interface.

    IFormulaContext

    This is a stubbed implementation of the IFormulaContext interface. Runtime engines should provide a complete implementation.

    Implements

    Index

    Constructors

    Methods

    • Provide a hint to the UI to format the return results.

      Parameters

      • numFmt: string

        The number format to apply to the results.

      Returns void

      • The UI will generally only format results if the user has not already formatted the area.
      • If a range is returned all values will be formatted with the same format.
    • Returns a date from an OADate value. This is used for date calculations.

      Parameters

      • oaDate: number

        A serialized date as a number.

      Returns Date

    • Returns a formula string or null if no formula exists.

      Parameters

      • row: number

        The row where the formula is located.

      • column: number

        The column where the formula is located.

      Returns string

      The formula string at the specified row and column, or null if no formula exists.

    • Returns a formatted value using the number formatting rules.

      Parameters

      • formatText: string

        The format to apply to the value.

      • value: Scalar

        The value to format.

      Returns string

      A formatted string of the value.

    • Used for functions that return RangeReferences such as INDIRECT and OFFSET and SUMIF.

      Parameters

      • coords: Readonly<IRange.Coords>

        The coordinates or a string of the range to get.

      • Optionalr1c1: boolean

        If true, the coordinates are in R1C1 format.

      Returns IReferenceRange

      An IReferenceRange representing the range.

      • PERFORMANCE Calling this method wil create a dynamic dependency on this range if not in the original inputs.
      • It is recommended to use this sparingly.
      • If coords is a string it will be parsed but named references are not supported.
    • For introspecting the current runtime.

      Returns IRuntime

      This is generally used for debugging but the built-in INFO function also makes use of this.

    • Returns a formula string or null if no formula exists.

      Parameters

      • OptionalsheetName: string

        The name of the sheet. If not provided the current sheet is used.

      Returns number

      -1 if the sheet does not exist.

    • Returns a spill reference at a location if it exists.

      Parameters

      • row: number

        The row where the spill starts.

      • column: number

        The column where the spill starts.

      Returns IReferenceRange<Scalar>

      An IReferenceRange if a spill exists at the location, otherwise null.

    • Retrieves a value from the sheet.

      Parameters

      • row: number

        The row where the value is located.

      • column: number

        The column where the value is located.

      Returns Scalar

      The value at the specified row and column, or null if no value exists.

    • Returns true if the value is a valid date.

      Parameters

      • value: any

        Any value to check.

      Returns boolean

    • Calling this will mark the function as volatile.

      Returns void

      • Volatile functions will be re-evaluated on the next calculation.
      • Functions may also be statically marked as volatile in the engine.
    • Parsed text as a date and time.

      Parameters

      • text: string

        The text to parse as a date and time.

      • OptionalrequireDate: boolean

        If true, the text must contain a date component.

      Returns number

      The OADate value or null if the text could not be parsed.

    • Returns an OADate value from a date. This is used for date calculations.

      Parameters

      • date: Date

        A date as a javascript object.

      Returns number