modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Interface CellXfData

    A cell format (XF) record referencing its font, fill and border by index and its number format by ID.

    interface CellXfData {
        alignment?: AlignmentData | null;
        applyAlignment?: boolean;
        applyBorder?: boolean;
        applyFill?: boolean;
        applyFont?: boolean;
        applyNumberFormat?: boolean;
        applyProtection?: boolean;
        borderId: number;
        fillId: number;
        fontId: number;
        numFmtId: number;
        pivotButton?: boolean;
        protection?: ProtectionData | null;
        quotePrefix?: boolean;
        xfId?: number | null;
    }
    Index
    alignment?: AlignmentData | null

    Text alignment configuration.

    applyAlignment?: boolean

    Whether the alignment from this XF should be applied.

    applyBorder?: boolean

    Whether the border from this XF should be applied.

    applyFill?: boolean

    Whether the fill from this XF should be applied.

    applyFont?: boolean

    Whether the font from this XF should be applied.

    applyNumberFormat?: boolean

    Whether the number format from this XF should be applied.

    applyProtection?: boolean

    Whether the protection from this XF should be applied.

    borderId: number

    Index into StylesData.borders.

    fillId: number

    Index into StylesData.fills.

    fontId: number

    Index into StylesData.fonts.

    numFmtId: number

    Number-format ID, not an index into StylesData.numFmts; 0 is General. An ID that matches a NumFmt.id names a format the workbook defines, which wins over a built-in format with the same ID; any other ID names a built-in format, whose code getBuiltinFormat returns. IDs from 164 up are custom: Workbook.validate() reports one without a matching NumFmt as an error.

    pivotButton?: boolean

    Whether the cell shows a pivot table field button (pivotButton).

    protection?: ProtectionData | null

    Cell protection configuration.

    quotePrefix?: boolean

    Whether the cell text is shown as entered, with a leading apostrophe (quotePrefix).

    xfId?: number | null

    Index into StylesData.cellStyleXfs, the style record this format derives from.