Interface ITableElementStyle

Extends cell styles but doesn't have all properties. Do we need to extend and return null (or a default value for these or omit or subclass a narrow class?) Omit

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

Hierarchy

Properties

Alignment properties.

border: ICellBorder
font: IFont
isTableElementStyle: true
namedStyle: string

The name of the namedStyle that is being referenced. For named styles this is null or ignored. If this is not specified then all unspecified fields will inherit from the normal style

numberFormat: string

Format used for

Protection properties.

quotePrefix: boolean

A boolean value indicating whether the text string in a cell should be prefixed by a single quote mark (e.g., 'text). In these cases, the quote is not stored in the Shared Strings Part.

Methods

  • This is used to determine if the style has rendering artifacts even if there is no content. (For example borders or background)

    Returns boolean

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