Column definition accepted by the adapters’ simple row-object API.
Package
@sheetwrite/core/adapter
Source
packages/core/src/adapter.ts#L161
Members 8
keyNon-empty row-object key, unique within the column list.
key: keyof Row & string;
titleSchema header label used by exports.
title: string;
widthUnzoomed width in CSS pixels; defaults to 120.
width?: number;
typeInput and formatting type; defaults to text.
type?:CellFormattype CellFormat = "text" | "number" | "date" | "currency";typeCellFormat="text"|"number"|"date"|"currency";typeCellFormat=|"text"|"number"|"date"|"currency";How a column's cells are typed, parsed, and rendered: text verbatim, number via its numberFormat, date as an Excel-style serial (see date-serial.ts) rendered by a date numberFormat, and currency as a plain number rendered by a currency numberFormat (e.g. $#,##0.00).API reference →;
numberFormatExcel number-format code used for number, date, or currency display.
numberFormat?: string;
headerStyleStyle applied to the painted column-letter header.
headerStyle?:CellStyleinterface CellStyle {
bold?: boolean;
italic?: boolean;
underline?: boolean;
strikethrough?: boolean;
fontSize?: number;
color?: string;
backgroundColor?: string;
align?: CellAlign;
wrap?: boolean;
border?: CellBorders;
}interfaceCellStyle {bold?:boolean;italic?:boolean;underline?:boolean;strikethrough?:boolean;fontSize?:number;color?:string;backgroundColor?:string;align?:CellAlign;wrap?:boolean;border?:CellBorders;}interfaceCellStyle {bold?:boolean;italic?:boolean;underline?:boolean;strikethrough?:boolean;fontSize?:number;color?:string;backgroundColor?:string;align?:CellAlign;wrap?:boolean;border?:CellBorders;}Serializable formatting applied to a cell or used as a column default.API reference →;
cellStyle?:CellStyleinterface CellStyle {
bold?: boolean;
italic?: boolean;
underline?: boolean;
strikethrough?: boolean;
fontSize?: number;
color?: string;
backgroundColor?: string;
align?: CellAlign;
wrap?: boolean;
border?: CellBorders;
}interfaceCellStyle {bold?:boolean;italic?:boolean;underline?:boolean;strikethrough?:boolean;fontSize?:number;color?:string;backgroundColor?:string;align?:CellAlign;wrap?:boolean;border?:CellBorders;}interfaceCellStyle {bold?:boolean;italic?:boolean;underline?:boolean;strikethrough?:boolean;fontSize?:number;color?:string;backgroundColor?:string;align?:CellAlign;wrap?:boolean;border?:CellBorders;}Serializable formatting applied to a cell or used as a column default.API reference →;
visibleSet to false to exclude the column from the live view and table exports.
visible?: boolean;
Declaration
View full TypeScript declaration
exportinterfaceSimpleColumn<RowextendsRecord<string, CellScalartype CellScalar = string | number | boolean | null;typeCellScalar=string|number|boolean|null;typeCellScalar=|string|number|boolean|null;A scalar that can be displayed directly.API reference →>> {
key:keyofRow&string;
title:string;
width?:number;
type?:CellFormattype CellFormat = "text" | "number" | "date" | "currency";typeCellFormat="text"|"number"|"date"|"currency";typeCellFormat=|"text"|"number"|"date"|"currency";How a column's cells are typed, parsed, and rendered: text verbatim, number via its numberFormat, date as an Excel-style serial (see date-serial.ts) rendered by a date numberFormat, and currency as a plain number rendered by a currency numberFormat (e.g. $#,##0.00).API reference →;
numberFormat?:string;
headerStyle?:CellStyleinterface CellStyle {
bold?: boolean;
italic?: boolean;
underline?: boolean;
strikethrough?: boolean;
fontSize?: number;
color?: string;
backgroundColor?: string;
align?: CellAlign;
wrap?: boolean;
border?: CellBorders;
}interfaceCellStyle {bold?:boolean;italic?:boolean;underline?:boolean;strikethrough?:boolean;fontSize?:number;color?:string;backgroundColor?:string;align?:CellAlign;wrap?:boolean;border?:CellBorders;}interfaceCellStyle {bold?:boolean;italic?:boolean;underline?:boolean;strikethrough?:boolean;fontSize?:number;color?:string;backgroundColor?:string;align?:CellAlign;wrap?:boolean;border?:CellBorders;}Serializable formatting applied to a cell or used as a column default.API reference →;
cellStyle?:CellStyleinterface CellStyle {
bold?: boolean;
italic?: boolean;
underline?: boolean;
strikethrough?: boolean;
fontSize?: number;
color?: string;
backgroundColor?: string;
align?: CellAlign;
wrap?: boolean;
border?: CellBorders;
}interfaceCellStyle {bold?:boolean;italic?:boolean;underline?:boolean;strikethrough?:boolean;fontSize?:number;color?:string;backgroundColor?:string;align?:CellAlign;wrap?:boolean;border?:CellBorders;}interfaceCellStyle {bold?:boolean;italic?:boolean;underline?:boolean;strikethrough?:boolean;fontSize?:number;color?:string;backgroundColor?:string;align?:CellAlign;wrap?:boolean;border?:CellBorders;}Serializable formatting applied to a cell or used as a column default.API reference →;