type property

PreferredWidth.type property

Gets the unit of measure used for this preferred width value.

get type(): Aspose.Words.Tables.PreferredWidthType

Examples

Shows how to verify the preferred width type and value of a table cell.

let doc = new aw.Document(base.myDir + "Tables.docx");

let table = doc.firstSection.body.tables.at(0);
let firstCell = table.firstRow.firstCell;

expect(firstCell.cellFormat.preferredWidth.type).toEqual(aw.Tables.PreferredWidthType.Percent);
expect(firstCell.cellFormat.preferredWidth.value).toEqual(11.16);

See Also