PowerPoint.TableRowProperties interface
テーブルの行のプロパティを指定します。
注釈
使用元
例
// 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();
});
プロパティ
| row |
各行に必要な高さをポイント単位で表すか、未定義です。 テーブルを追加するとき、高さが未定義の行の場合、行の高さは、テーブルの残りの高さをそれらの行間で均等に分割することによって計算されます。 テーブルの高さが定義されていない場合は、既定の行の高さが使用されます。 |
プロパティの詳細
rowHeight
各行に必要な高さをポイント単位で表すか、未定義です。
テーブルを追加するとき、高さが未定義の行の場合、行の高さは、テーブルの残りの高さをそれらの行間で均等に分割することによって計算されます。 テーブルの高さが定義されていない場合は、既定の行の高さが使用されます。
rowHeight?: number | undefined;
プロパティ値
number | undefined
注釈
例
// 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();
});