View as Markdown

API reference: @salmonui/core/export-model

ExportCellinterface

import type { ExportCell } from '@salmonui/core/export-model';
interface ExportCell {
    readonly value: unknown;
    readonly text: string;
    readonly type: ColumnType;
    readonly style?: ExportCellStyle;
    readonly formula?: string;
    readonly colSpan?: number;
    readonly rowSpan?: number;
    readonly image?: ExportImage;
}

One exported cell. value is the typed value (numbers, booleans, Date, strings), text the display string.

ExportCell members (8)
NameSignatureDescription
valuereadonly value: unknown;
textreadonly text: string;
typereadonly type: ColumnType;
styleoptionalreadonly style?: ExportCellStyle;
formulaoptionalreadonly formula?: string;

XLSX formula without the leading =. Security: never build it from untrusted input.

colSpanoptionalreadonly colSpan?: number;
rowSpanoptionalreadonly rowSpan?: number;
imageoptionalreadonly image?: ExportImage;

Image drawn in the cell; text stays the fallback.