@squareys/webdecks-sdk - v0.0.0
    Preparing search index...

    Class Cell

    One cell, addressed by (sheet, row, column). A cell has no stable engine handle, so the wrapper is cached per address within an edit epoch (see Sheet.cell) — sheet.cell(r,c) === sheet.cell(r,c) holds until a structural edit bumps the epoch. Reads round-trip through the engine; mutators chain and repaint any attached viewport. The colour-preserving merge setters (Cell.setFill, Cell.setFont, …) are preferred over Cell.setFormat, which replaces the whole character-format block.

    Hierarchy (View Summary)

    Index
    row: number

    The cell's row.

    column: number

    The cell's column.

    • get isValid(): boolean

      Whether this wrapper still refers to a live engine object.

      Returns boolean

    • set _index(value: number): void

      Parameters

      • value: number

      Returns void

    • get valueType(): number

      The cell's value kind (see CellType).

      Returns number

    • get isFormula(): boolean

      Whether the cell holds a formula.

      Returns boolean

    • get isEmpty(): boolean

      Whether the cell is empty.

      Returns boolean

    • get text(): string

      The cell's display text (number-formatted).

      Returns string

    • get number(): number

      The cell's numeric value (a formula's cached result included; 0 for text/empty).

      Returns number

    • get formula(): string

      The formula source with its leading =, or "" when the cell is not a formula.

      Returns string

    • get format(): number

      The character/fill format bit mask (see CellFormat).

      Returns number

    • get foreground(): number

      The text colour packed 0xRRGGBB, or -1 when no explicit colour is set.

      Returns number

    • get background(): number

      The fill colour packed 0xRRGGBB, or -1 when no explicit fill is set.

      Returns number

    • get isBold(): boolean

      Whether the cell is bold.

      Returns boolean

    • The cell's hyperlink URL ("" if none).

      Returns string

    • get comment(): string

      The cell's comment/note text ("" if none).

      Returns string

    • Reference equality is the identity test — prefer a === b. This is retained only for the rare cross-realm case where two wrappers describe the same handle by value. Reads the raw index so comparing a stale wrapper never throws.

      Parameters

      • other: Handle<unknown> | null

      Returns boolean

    • A readable identity for logs and diagnostics, never [object Object].

      Returns string

    • Set the cell, auto-detecting a number, a formula (leading =), or text.

      Parameters

      • text: string

      Returns this

    • Set the cell to verbatim text (no number/formula auto-detection).

      Parameters

      • text: string

      Returns this

    • Set a numeric value.

      Parameters

      • value: number

      Returns this

    • Set a formula from its source (a leading = is accepted).

      Parameters

      • formula: string

      Returns this

    • Set the fill colour (packed 0xRRGGBB), preserving the cell's other attributes.

      Parameters

      • rgb: number

      Returns this

    • Set the text colour (packed 0xRRGGBB), preserving the cell's other attributes.

      Parameters

      • rgb: number

      Returns this

    • Set the font family and point size, preserving the cell's other attributes.

      Parameters

      • family: string
      • sizePoints: number

      Returns this

    • Set a verbatim OOXML number-format code (e.g. "0.00%"); an empty code clears it.

      Parameters

      • code: string

      Returns this

    • Set the left-indent level (0..the engine's max).

      Parameters

      • level: number

      Returns this

    • Set the text rotation as an OOXML textRotation code (0 none, 1..180, 255 stacked).

      Parameters

      • rotation: number

      Returns this

    • Replace the whole character-format bit mask (see CellFormat), leaving the cell's colours and alignment as they are but resetting its cell borders. Prefer the merge setters (Cell.setFill, Cell.setFont) for targeted changes.

      Parameters

      • format: number

      Returns this

    • Toggle bold, preserving the cell's other character-format bits.

      Parameters

      • on: boolean

      Returns this

    • Toggle italic, preserving the cell's other character-format bits.

      Parameters

      • on: boolean

      Returns this

    • Toggle underline, preserving the cell's other character-format bits.

      Parameters

      • on: boolean

      Returns this

    • Set a hyperlink URL (with an optional tooltip) on the cell.

      Parameters

      • url: string
      • tooltip: string = ""

      Returns this

    • Add a note/comment (author + text) on the cell.

      Parameters

      • text: string
      • author: string = ""

      Returns this