SheetXL - v1.0.2
    Preparing search index...

    Interface IFillable<S, F, O>

    A style that has a fill: a cell's background, or what a shape or chart part is filled with.

    Code that formats a fill takes an IFillable, so the same code fills a cell, a shape or a chart title.

    const highlight = (style: IFillable) => style.setFill('#ffd966');
    highlight(range.getStyle());
    highlight(chart.getTitle().getStyle());
    interface IFillable<
        S = unknown,
        F extends IFill = ISolid | IGradient | IPattern | IImage | INone,
        O extends ITransaction.OperationOptions = ITransaction.OperationOptions,
    > {
        getFill(): F;
        setFill(fill: IFill.Update, options?: O): S;
        setFillGradient(options?: O): IGradient;
        setFillNone(options?: O): INone;
        setFillPattern(options?: O): IPattern;
        setFillSolid(options?: O): ISolid;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index
    • Returns the fill, resolved.

      Returns F

    • Sets the fill: a color, a fill, or fill properties; null clears it.

      Parameters

      Returns S

    • Makes the fill a gradient and returns it.

      Parameters

      • Optionaloptions: O

      Returns IGradient

    • Removes the fill and returns it.

      Parameters

      • Optionaloptions: O

      Returns INone

    • Makes the fill a pattern and returns it.

      Parameters

      • Optionaloptions: O

      Returns IPattern

    • Makes the fill solid and returns it.

      Parameters

      • Optionaloptions: O

      Returns ISolid