docx
    Preparing search index...

    Type Alias ITableOptions

    Options for creating a Table element.

    Table

    type ITableOptions = {
        alignment?: typeof AlignmentType[keyof typeof AlignmentType];
        borders?: ITableBordersOptions;
        cellSpacing?: ITableCellSpacingProperties;
        columnWidths?: readonly number[];
        columnWidthsRevision?: ITableGridChangeOptions;
        float?: ITableFloatOptions;
        indent?: ITableWidthProperties;
        layout?: typeof TableLayoutType[keyof typeof TableLayoutType];
        margins?: ITableCellMarginOptions;
        revision?: ITablePropertiesChangeOptions;
        rows: readonly TableRow[];
        style?: string;
        tableLook?: ITableLookOptions;
        visuallyRightToLeft?: boolean;
        width?: ITableWidthProperties;
    }
    Index
    alignment?: typeof AlignmentType[keyof typeof AlignmentType]
    cellSpacing?: ITableCellSpacingProperties
    columnWidths?: readonly number[]

    Widths of the grid columns (w:tblGrid) in twips (twentieths of a point).

    Word treats the grid as a hint and lays the table out from width and the cells' widths, sizing columns whose cells have no width to their content, so each cell without a width of its own is given the width of the columns it spans, scaled up to the table's width when that is wider. Google Docs, Apple Pages and QuickLook lay the table out from the grid alone and ignore percentage widths. When omitted, the grid is derived from width and the cells' widths, resolved against the page (or, for nested tables, the parent cell) when the document is packed, so the table renders the same in every consumer. Supply explicit values to take full control of the grid.

    columnWidthsRevision?: ITableGridChangeOptions
    layout?: typeof TableLayoutType[keyof typeof TableLayoutType]
    margins?: ITableCellMarginOptions
    rows: readonly TableRow[]
    style?: string
    tableLook?: ITableLookOptions
    visuallyRightToLeft?: boolean

    Preferred width of the table. Defaults to auto.