PowerPoint.TableColumnProperties 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();
});
プロパティ
| column |
各列の目的の幅をポイント単位で表すか、未定義です。 テーブルを追加するとき、幅が未定義の列の場合、列幅は、テーブルの残りの幅をそれらの列に均等に分割することによって計算されます。 テーブルの幅が定義されていない場合は、既定の列幅が使用されます。 |
プロパティの詳細
columnWidth
各列の目的の幅をポイント単位で表すか、未定義です。
テーブルを追加するとき、幅が未定義の列の場合、列幅は、テーブルの残りの幅をそれらの列に均等に分割することによって計算されます。 テーブルの幅が定義されていない場合は、既定の列幅が使用されます。
columnWidth?: 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();
});