Interface TableModelOptions

interface TableModelOptions {
    defaultTableStyle?: TableStyleInfo;
    initialJSON?: Partial<{
        autoFilter?: string | AutoFilter | Partial<{
            filterColumns?: any;
            ref?: string;
            sortState?: any;
        }>;
        columns?: string | TableColumn[] | (string | TableColumn | Partial<{
            name: string;
        }>)[];
        displayName?: string;
        headerRowCount?: string | number;
        name: string;
        ref: string | CellRangeCoords | Partial<{
            colEnd: string | number;
            colStart: string | number;
            rowEnd: string | number;
            rowStart: string | number;
        }>;
        sortState?: any;
        styleInfo?: string | TableStyleInfo | Partial<{
            name: string;
            showColumnStripes?: string | Partial<boolean>;
            showFirstColumn?: string | Partial<boolean>;
            showLastColumn?: string | Partial<boolean>;
            showRowStripes?: string | Partial<boolean>;
        }>;
        totalsRowCount?: string | number;
    }>;
    sheetStyle?: ISheetStyle;
    transactionStore?: TransactionStore;
}

Properties

defaultTableStyle?: TableStyleInfo
initialJSON?: Partial<{
    autoFilter?: string | AutoFilter | Partial<{
        filterColumns?: any;
        ref?: string;
        sortState?: any;
    }>;
    columns?: string | TableColumn[] | (string | TableColumn | Partial<{
        name: string;
    }>)[];
    displayName?: string;
    headerRowCount?: string | number;
    name: string;
    ref: string | CellRangeCoords | Partial<{
        colEnd: string | number;
        colStart: string | number;
        rowEnd: string | number;
        rowStart: string | number;
    }>;
    sortState?: any;
    styleInfo?: string | TableStyleInfo | Partial<{
        name: string;
        showColumnStripes?: string | Partial<boolean>;
        showFirstColumn?: string | Partial<boolean>;
        showLastColumn?: string | Partial<boolean>;
        showRowStripes?: string | Partial<boolean>;
    }>;
    totalsRowCount?: string | number;
}>

Type declaration

  • Optional autoFilter?: string | AutoFilter | Partial<{
        filterColumns?: any;
        ref?: string;
        sortState?: any;
    }>
  • Optional columns?: string | TableColumn[] | (string | TableColumn | Partial<{
        name: string;
    }>)[]
  • Optional displayName?: string

    A string representing the name of the table. This is the name that shall be used in formula references, and displayed in the UI to the spreadsheet user. This name shall not have any spaces in it, and it must be unique amongst all other displayNames and definedNames in the workbook. The character lengths and restrictions are the same as for definedNames.

    See SpreadsheetML Reference - Workbook definedNames section for details.

  • Optional headerRowCount?: string | number

    An integer representing the number of header rows showing at the top of the table. 0 means that the header row is not shown

    Default Value

    1
    
  • name: string

    The unique name of the table

  • ref: string | CellRangeCoords | Partial<{
        colEnd: string | number;
        colStart: string | number;
        rowEnd: string | number;
        rowStart: string | number;
    }>

    The range on the relevant sheet that the table occupies expressed using A1 style referencing. The reference shall include the totals row if it is shown

  • Optional sortState?: any
  • Optional styleInfo?: string | TableStyleInfo | Partial<{
        name: string;
        showColumnStripes?: string | Partial<boolean>;
        showFirstColumn?: string | Partial<boolean>;
        showLastColumn?: string | Partial<boolean>;
        showRowStripes?: string | Partial<boolean>;
    }>

    If not specified than the default table style is used If the style name isn't valid then uses a 'none' style.

  • Optional totalsRowCount?: string | number

    An integer representing the number of totals rows that shall be shown at the bottom of the table.

    Default Value

    0
    
sheetStyle?: ISheetStyle
transactionStore?: TransactionStore

A transaction store that can be used to undo/redo changes to the table.