PowerPoint.TableRowProperties interface
Provides the table row properties.
Remarks
[ API set: PowerPointApi 1.8 ]
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Specifies the column widths and row heights of a table.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;
// Add a table, specifying column widths and row heights
shapes.addTable(3, 4, {
columns: [{ columnWidth: 100 }, { columnWidth: 200 }, { columnWidth: 100 }, { columnWidth: 200 }],
rows: [{ rowHeight: 60 }, { rowHeight: 120 }, { rowHeight: 180 }]
});
await context.sync();
});
Properties
row |
Represents the desired height of each row in points, or is undefined. When a table is being added, for rows whose height is undefined, the row height will be calculated by evenly dividing the remaining height of the table amongst those rows. If the table doesn't have a defined height, a default row height will be used. |
Property Details
rowHeight
Represents the desired height of each row in points, or is undefined.
When a table is being added, for rows whose height is undefined, the row height will be calculated by evenly dividing the remaining height of the table amongst those rows. If the table doesn't have a defined height, a default row height will be used.
rowHeight?: number | undefined;
Property Value
number | undefined
Remarks
[ API set: PowerPointApi 1.8 ]
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Specifies the column widths and row heights of a table.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;
// Add a table, specifying column widths and row heights
shapes.addTable(3, 4, {
columns: [{ columnWidth: 100 }, { columnWidth: 200 }, { columnWidth: 100 }, { columnWidth: 200 }],
rows: [{ rowHeight: 60 }, { rowHeight: 120 }, { rowHeight: 180 }]
});
await context.sync();
});