Interface CellUpdate

Used for updating cells. If a value is null then this will be treated as a remove.

interface CellUpdate {
    error?: string;
    formula?: string;
    hyperlink?: string | Partial<{
        address: string;
        history?: string | Partial<boolean>;
        tgtFrame?: string;
        tooltip?: string;
    }>;
    style?: ICellStyle | Partial<{
        alignment: string | CellAlignmentValues | Partial<{
            horizontal: string | ((value, resolveShorthands?) => string);
            indent: string | number | ((value, resolveShorthands?) => string | number);
            justifyLastLine: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
            overflow: string | ((value, resolveShorthands?) => string);
            readingDirection: string | ((value, resolveShorthands?) => string);
            relativeIndent: string | number | ((value, resolveShorthands?) => string | number);
            rotation: string | number | ((value, resolveShorthands?) => string | number);
            stacked: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
            vertical: string | ((value, resolveShorthands?) => string);
        }> | ((value, resolveShorthands?) => string | CellAlignmentValues);
        border: string | CellBorderValues | Partial<{
            bottom: string | BorderStroke | Partial<{
                color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
                style: string | ((value, resolveShorthands?) => ...);
            }> | ((value, resolveShorthands?) => string | BorderStroke);
            diagonalDown: string | BorderStroke | Partial<{
                color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
                style: string | ((value, resolveShorthands?) => ...);
            }> | ((value, resolveShorthands?) => string | BorderStroke);
            diagonalUp: string | BorderStroke | Partial<{
                color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
                style: string | ((value, resolveShorthands?) => ...);
            }> | ((value, resolveShorthands?) => string | BorderStroke);
            horizontal: string | BorderStroke | Partial<{
                color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
                style: string | ((value, resolveShorthands?) => ...);
            }> | ((value, resolveShorthands?) => string | BorderStroke);
            left: string | BorderStroke | Partial<{
                color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
                style: string | ((value, resolveShorthands?) => ...);
            }> | ((value, resolveShorthands?) => string | BorderStroke);
            right: string | BorderStroke | Partial<{
                color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
                style: string | ((value, resolveShorthands?) => ...);
            }> | ((value, resolveShorthands?) => string | BorderStroke);
            top: string | BorderStroke | Partial<{
                color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
                style: string | ((value, resolveShorthands?) => ...);
            }> | ((value, resolveShorthands?) => string | BorderStroke);
            vertical: string | BorderStroke | Partial<{
                color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
                style: string | ((value, resolveShorthands?) => ...);
            }> | ((value, resolveShorthands?) => string | BorderStroke);
        }> | ((value, resolveShorthands?) => string | CellBorderValues);
        fill: string | AdjustedColor | SolidFillValues | GradientFillValues | PatternFillValues | NoneFillValues | Partial<{
            val: string | ((value, resolveShorthands?) => string);
            adjustments: any;
            asCSS: any;
            isEqual: any;
            isImmutable: any;
            toHSLA: any;
            toHex: any;
            toJSON: any;
            toRGBA: any;
            toString: any;
        } | {
            color: string | AdjustedColor | Partial<{
                val: (...) | (...);
                adjustments: any;
                asCSS: any;
                isEqual: any;
                isImmutable: any;
                toHSLA: any;
                toHex: any;
                toJSON: any;
                toRGBA: any;
                toString: any;
            }> | ((value, resolveShorthands?) => string | AdjustedColor);
            fillType: string | ((value, resolveShorthands?) => string);
        } | {
            angle: string | number | ((value, resolveShorthands?) => string | number);
            fillTo: string | Rectangle | Partial<{
                bottom: (...) | (...) | (...);
                left: (...) | (...) | (...);
                right: (...) | (...) | (...);
                top: (...) | (...) | (...);
            }> | ((value, resolveShorthands?) => string | Rectangle);
            fillType: string | ((value, resolveShorthands?) => string);
            gradientType: string | ((value, resolveShorthands?) => string);
            stops: string | GradientStop[] | (string | GradientStop | Partial<(...)> | ((value, resolveShorthands?) => ...))[] | ((value, resolveShorthands?) => string | (...)[]);
        } | {
            background: string | AdjustedColor | Partial<{
                val: (...) | (...);
                adjustments: any;
                asCSS: any;
                isEqual: any;
                isImmutable: any;
                toHSLA: any;
                toHex: any;
                toJSON: any;
                toRGBA: any;
                toString: any;
            }> | ((value, resolveShorthands?) => string | AdjustedColor);
            fillType: string | ((value, resolveShorthands?) => string);
            foreground: string | AdjustedColor | Partial<{
                val: (...) | (...);
                adjustments: any;
                asCSS: any;
                isEqual: any;
                isImmutable: any;
                toHSLA: any;
                toHex: any;
                toJSON: any;
                toRGBA: any;
                toString: any;
            }> | ((value, resolveShorthands?) => string | AdjustedColor);
            patternType: string | ((value, resolveShorthands?) => string);
        } | {
            fillType: string | ((value, resolveShorthands?) => string);
        }> | ((value, resolveShorthands?) => string | AdjustedColor | SolidFillValues | GradientFillValues | PatternFillValues | NoneFillValues);
        font: string | FontValues | Partial<{
            extend: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
            family: string | ((value, resolveShorthands?) => string);
            familyFallbacks: string | string[] | (string | ((value, resolveShorthands?) => string))[] | ((value, resolveShorthands?) => string | string[]);
            fill: string | AdjustedColor | Partial<{
                val: string | ((value, resolveShorthands?) => ...);
                adjustments: any;
                asCSS: any;
                isEqual: any;
                isImmutable: any;
                toHSLA: any;
                toHex: any;
                toJSON: any;
                toRGBA: any;
                toString: any;
            }> | ((value, resolveShorthands?) => string | AdjustedColor);
            letterSpacing: string | number | ((value, resolveShorthands?) => string | number);
            outline: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
            scheme: string | ((value, resolveShorthands?) => string);
            shadow: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
            size: string | number | ((value, resolveShorthands?) => string | number);
            strike: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
            style: string | ((value, resolveShorthands?) => string);
            underline: string | boolean | ((value, resolveShorthands?) => string | boolean);
            verticalAlign: string | ((value, resolveShorthands?) => string);
            weight: string | number | ((value, resolveShorthands?) => string | number);
        }> | ((value, resolveShorthands?) => string | FontValues);
        namedStyle: string | ((value, resolveShorthands?) => string);
        numberFormat: string | ((value, resolveShorthands?) => string);
        protection: string | CellProtectionValues | Partial<{
            formulaHidden: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
            locked: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
        }> | ((value, resolveShorthands?) => string | CellProtectionValues);
        quotePrefix: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
    }> | ICellStyleUpdater;
    value?: ICellValue | ICellValueUpdater;
}

Properties

error?: string

If true then the value is interpreted as an error.

formula?: string
hyperlink?: string | Partial<{
    address: string;
    history?: string | Partial<boolean>;
    tgtFrame?: string;
    tooltip?: string;
}>

Allow to to set a hyperlink to this value.

Remarks

style?: ICellStyle | Partial<{
    alignment: string | CellAlignmentValues | Partial<{
        horizontal: string | ((value, resolveShorthands?) => string);
        indent: string | number | ((value, resolveShorthands?) => string | number);
        justifyLastLine: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
        overflow: string | ((value, resolveShorthands?) => string);
        readingDirection: string | ((value, resolveShorthands?) => string);
        relativeIndent: string | number | ((value, resolveShorthands?) => string | number);
        rotation: string | number | ((value, resolveShorthands?) => string | number);
        stacked: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
        vertical: string | ((value, resolveShorthands?) => string);
    }> | ((value, resolveShorthands?) => string | CellAlignmentValues);
    border: string | CellBorderValues | Partial<{
        bottom: string | BorderStroke | Partial<{
            color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
            style: string | ((value, resolveShorthands?) => ...);
        }> | ((value, resolveShorthands?) => string | BorderStroke);
        diagonalDown: string | BorderStroke | Partial<{
            color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
            style: string | ((value, resolveShorthands?) => ...);
        }> | ((value, resolveShorthands?) => string | BorderStroke);
        diagonalUp: string | BorderStroke | Partial<{
            color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
            style: string | ((value, resolveShorthands?) => ...);
        }> | ((value, resolveShorthands?) => string | BorderStroke);
        horizontal: string | BorderStroke | Partial<{
            color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
            style: string | ((value, resolveShorthands?) => ...);
        }> | ((value, resolveShorthands?) => string | BorderStroke);
        left: string | BorderStroke | Partial<{
            color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
            style: string | ((value, resolveShorthands?) => ...);
        }> | ((value, resolveShorthands?) => string | BorderStroke);
        right: string | BorderStroke | Partial<{
            color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
            style: string | ((value, resolveShorthands?) => ...);
        }> | ((value, resolveShorthands?) => string | BorderStroke);
        top: string | BorderStroke | Partial<{
            color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
            style: string | ((value, resolveShorthands?) => ...);
        }> | ((value, resolveShorthands?) => string | BorderStroke);
        vertical: string | BorderStroke | Partial<{
            color: string | AdjustedColor | Partial<(...)> | ((value, resolveShorthands?) => ...);
            style: string | ((value, resolveShorthands?) => ...);
        }> | ((value, resolveShorthands?) => string | BorderStroke);
    }> | ((value, resolveShorthands?) => string | CellBorderValues);
    fill: string | AdjustedColor | SolidFillValues | GradientFillValues | PatternFillValues | NoneFillValues | Partial<{
        val: string | ((value, resolveShorthands?) => string);
        adjustments: any;
        asCSS: any;
        isEqual: any;
        isImmutable: any;
        toHSLA: any;
        toHex: any;
        toJSON: any;
        toRGBA: any;
        toString: any;
    } | {
        color: string | AdjustedColor | Partial<{
            val: (...) | (...);
            adjustments: any;
            asCSS: any;
            isEqual: any;
            isImmutable: any;
            toHSLA: any;
            toHex: any;
            toJSON: any;
            toRGBA: any;
            toString: any;
        }> | ((value, resolveShorthands?) => string | AdjustedColor);
        fillType: string | ((value, resolveShorthands?) => string);
    } | {
        angle: string | number | ((value, resolveShorthands?) => string | number);
        fillTo: string | Rectangle | Partial<{
            bottom: (...) | (...) | (...);
            left: (...) | (...) | (...);
            right: (...) | (...) | (...);
            top: (...) | (...) | (...);
        }> | ((value, resolveShorthands?) => string | Rectangle);
        fillType: string | ((value, resolveShorthands?) => string);
        gradientType: string | ((value, resolveShorthands?) => string);
        stops: string | GradientStop[] | (string | GradientStop | Partial<(...)> | ((value, resolveShorthands?) => ...))[] | ((value, resolveShorthands?) => string | (...)[]);
    } | {
        background: string | AdjustedColor | Partial<{
            val: (...) | (...);
            adjustments: any;
            asCSS: any;
            isEqual: any;
            isImmutable: any;
            toHSLA: any;
            toHex: any;
            toJSON: any;
            toRGBA: any;
            toString: any;
        }> | ((value, resolveShorthands?) => string | AdjustedColor);
        fillType: string | ((value, resolveShorthands?) => string);
        foreground: string | AdjustedColor | Partial<{
            val: (...) | (...);
            adjustments: any;
            asCSS: any;
            isEqual: any;
            isImmutable: any;
            toHSLA: any;
            toHex: any;
            toJSON: any;
            toRGBA: any;
            toString: any;
        }> | ((value, resolveShorthands?) => string | AdjustedColor);
        patternType: string | ((value, resolveShorthands?) => string);
    } | {
        fillType: string | ((value, resolveShorthands?) => string);
    }> | ((value, resolveShorthands?) => string | AdjustedColor | SolidFillValues | GradientFillValues | PatternFillValues | NoneFillValues);
    font: string | FontValues | Partial<{
        extend: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
        family: string | ((value, resolveShorthands?) => string);
        familyFallbacks: string | string[] | (string | ((value, resolveShorthands?) => string))[] | ((value, resolveShorthands?) => string | string[]);
        fill: string | AdjustedColor | Partial<{
            val: string | ((value, resolveShorthands?) => ...);
            adjustments: any;
            asCSS: any;
            isEqual: any;
            isImmutable: any;
            toHSLA: any;
            toHex: any;
            toJSON: any;
            toRGBA: any;
            toString: any;
        }> | ((value, resolveShorthands?) => string | AdjustedColor);
        letterSpacing: string | number | ((value, resolveShorthands?) => string | number);
        outline: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
        scheme: string | ((value, resolveShorthands?) => string);
        shadow: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
        size: string | number | ((value, resolveShorthands?) => string | number);
        strike: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
        style: string | ((value, resolveShorthands?) => string);
        underline: string | boolean | ((value, resolveShorthands?) => string | boolean);
        verticalAlign: string | ((value, resolveShorthands?) => string);
        weight: string | number | ((value, resolveShorthands?) => string | number);
    }> | ((value, resolveShorthands?) => string | FontValues);
    namedStyle: string | ((value, resolveShorthands?) => string);
    numberFormat: string | ((value, resolveShorthands?) => string);
    protection: string | CellProtectionValues | Partial<{
        formulaHidden: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
        locked: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
    }> | ((value, resolveShorthands?) => string | CellProtectionValues);
    quotePrefix: string | Partial<boolean> | ((value, resolveShorthands?) => string | boolean);
}> | ICellStyleUpdater

Update the style.

If a Date is passed to it will be converted internally into number with a date format (unless the style format is also set)