docx
    Preparing search index...

    Type Alias ITableOptions

    Options for creating a Table element.

    Note: 0-width columns don't get rendered correctly, so we need to give them some value. A reasonable default would be ~6in / numCols, but if we do that it becomes very hard to resize the table using setWidth, unless the layout algorithm is set to 'fixed'. Instead, the approach here means even in 'auto' layout, setting a width on the table will make it look reasonable, as the layout algorithm will expand columns to fit its content.

    Table

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

    Properties

    alignment?: typeof AlignmentType[keyof typeof AlignmentType]
    cellSpacing?: ITableCellSpacingProperties
    columnWidths?: readonly number[]
    layout?: typeof TableLayoutType[keyof typeof TableLayoutType]
    margins?: ITableCellMarginOptions
    rows: readonly TableRow[]
    style?: string
    visuallyRightToLeft?: boolean