SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Variable ScalarTypeConst

    ScalarType: {
        Boolean: "boolean";
        Error: "error";
        Null: "null";
        Number: "number";
        RichData: "richData";
        String: "string";
    } = ...

    Identifies which variant of Scalar a cell value is.

    Because Scalar is a union type, ScalarType gives you a safe, string-based discriminant for branching on value kind — useful in formula implementations, data-profiling UIs, and type-coercion logic without relying on typeof or instanceof checks that do not cover all cases (e.g. null, FormulaError, IRichData).

    Type Declaration

    • ReadonlyBoolean: "boolean"

      A boolean value (true or false).

    • ReadonlyError: "error"

      A cell that contains an error value.

      Error cells represent cells where an error occurred during formula evaluation or data processing.

    • ReadonlyNull: "null"

      Represents the absence of a value.

    • ReadonlyNumber: "number"

      A numeric value.

      Dates are expressed as formatted numbers within cells. They are internally stored as serial numbers and can be formatted to display as dates.

    • ReadonlyRichData: "richData"

      A complex data type represented as IRichData.

      Rich data are objects that have complex structures and can contain data that goes beyond simple strings, numbers, booleans, or error values. For example, hyperlinks and images are represented as rich data.

    • ReadonlyString: "string"

      A string value.

    Dates have no dedicated variant. They are stored as Number values with a number format applied. Use FormulaContext.isValidDate to distinguish them at runtime. InteropScalarType extends this enum with a Date variant for API boundaries that accept JavaScript Date objects.