type property
PreferredWidth.type property
Gets the unit of measure used for this preferred width value.
@property
def type(self) -> aspose.words.tables.PreferredWidthType:
...
Examples
Shows how to verify the preferred width type and value of a table cell.
doc = aw.Document(file_name=MY_DIR + 'Tables.docx')
table = doc.first_section.body.tables[0]
first_cell = table.first_row.first_cell
self.assertEqual(aw.tables.PreferredWidthType.PERCENT, first_cell.cell_format.preferred_width.type)
self.assertEqual(11.16, first_cell.cell_format.preferred_width.value)
See Also
- module aspose.words.tables
- class PreferredWidth