次の方法で共有


PowerPoint.TableRowProperties 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();
});

プロパティ

rowHeight

各行の目的の高さをポイント単位で表すか、未定義です。

テーブルが追加されている場合、高さが未定義の行の場合、行の高さは、テーブルの残りの高さをそれらの行に均等に分割することによって計算されます。 テーブルに定義された高さがない場合は、既定の行の高さが使用されます。

プロパティの詳細

rowHeight

各行の目的の高さをポイント単位で表すか、未定義です。

テーブルが追加されている場合、高さが未定義の行の場合、行の高さは、テーブルの残りの高さをそれらの行に均等に分割することによって計算されます。 テーブルに定義された高さがない場合は、既定の行の高さが使用されます。

rowHeight?: 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();
});