Interface ITableModel

interface ITableModel {
    autoFilter?: AutoFilter;
    columns?: TableColumn[];
    displayName?: string;
    headerRowCount?: number;
    isModelTable: true;
    name: string;
    ref: CellRangeCoords;
    sortState?: any;
    styleInfo?: TableStyleInfo;
    totalsRowCount?: number;
    addListener(listener): RemoveListener;
    close(): void;
    getTableStyle(): ITableStyle;
    insertColumns(offset, count): void;
    insertRows(offset, count): void;
    isClosed(): boolean;
    removeColumns(offset, count): void;
    removeRows(offset, count): void;
    toJSON(): 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;
    }>;
    update(values, options?): void;
}

Hierarchy (view full)

Implemented by

Properties

autoFilter?: AutoFilter
columns?: TableColumn[]
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.

headerRowCount?: 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
isModelTable: true

Purely for runtime inspection

name: string

The unique name of the table

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

sortState?: any
styleInfo?: TableStyleInfo

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

totalsRowCount?: number

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

Default Value

0

Methods

  • Free all resources associated with the sheet and mark as read-only.

    Returns void

    Remarks

    This is called by workbooks when the sheet is closed

    See

    addListener for closeEvent

  • Parameters

    • offset: number
    • count: number

    Returns void

  • Parameters

    • offset: number
    • count: number

    Returns void

  • Returns true if the table has been closed.

    Returns boolean

  • Parameters

    • offset: number
    • count: number

    Returns void

  • Parameters

    • offset: number
    • count: number

    Returns void

  • Saves the current state of the table to a JSON object.

    Returns 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;
    }>

  • Update the table with the new values.

    Parameters

    • values: 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;
      }>
    • Optional options: UpdateTableModelOptions

    Returns void