PowerPoint.TableColumnProperties interface
テーブル列のプロパティを提供します。
注釈
[ API セット: PowerPointApi 1.8 ]
例
// 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
注釈
[ API セット: PowerPointApi 1.8 ]
例
// 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();
});