次の方法で共有


PowerPoint.TableMergedAreaProperties 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 merge areas of a table.
await PowerPoint.run(async (context) => {
  const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

  // Add a table, specifying one 2x2 merged area.
  shapes.addTable(3, 4, {
    values: [
      ["A", "BB", "CCC", "DDDD"],
      ["E", "FF", "", "HHHH"],
      ["1", "", "", "1234"]
    ],
    mergedAreas: [{ rowIndex: 1, columnIndex: 1, rowCount: 2, columnCount: 2 }]
  });
  await context.sync();
});

プロパティ

columnCount

結合セル領域の列数を指定します。 1 以上である必要があります。

columnIndex

マージされた領域の左上のセルの列の 0 から始まるインデックスを指定します。

rowCount

結合セル領域の行数を指定します。 1 以上である必要があります。

rowIndex

マージされた領域の左上のセルの行の 0 から始まるインデックスを指定します。

プロパティの詳細

columnCount

結合セル領域の列数を指定します。 1 以上である必要があります。

columnCount: number;

プロパティ値

number

注釈

[ 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 merge areas of a table.
await PowerPoint.run(async (context) => {
  const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

  // Add a table, specifying one 2x2 merged area.
  shapes.addTable(3, 4, {
    values: [
      ["A", "BB", "CCC", "DDDD"],
      ["E", "FF", "", "HHHH"],
      ["1", "", "", "1234"]
    ],
    mergedAreas: [{ rowIndex: 1, columnIndex: 1, rowCount: 2, columnCount: 2 }]
  });
  await context.sync();
});

columnIndex

マージされた領域の左上のセルの列の 0 から始まるインデックスを指定します。

columnIndex: number;

プロパティ値

number

注釈

[ 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 merge areas of a table.
await PowerPoint.run(async (context) => {
  const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

  // Add a table, specifying one 2x2 merged area.
  shapes.addTable(3, 4, {
    values: [
      ["A", "BB", "CCC", "DDDD"],
      ["E", "FF", "", "HHHH"],
      ["1", "", "", "1234"]
    ],
    mergedAreas: [{ rowIndex: 1, columnIndex: 1, rowCount: 2, columnCount: 2 }]
  });
  await context.sync();
});

rowCount

結合セル領域の行数を指定します。 1 以上である必要があります。

rowCount: number;

プロパティ値

number

注釈

[ 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 merge areas of a table.
await PowerPoint.run(async (context) => {
  const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

  // Add a table, specifying one 2x2 merged area.
  shapes.addTable(3, 4, {
    values: [
      ["A", "BB", "CCC", "DDDD"],
      ["E", "FF", "", "HHHH"],
      ["1", "", "", "1234"]
    ],
    mergedAreas: [{ rowIndex: 1, columnIndex: 1, rowCount: 2, columnCount: 2 }]
  });
  await context.sync();
});

rowIndex

マージされた領域の左上のセルの行の 0 から始まるインデックスを指定します。

rowIndex: number;

プロパティ値

number

注釈

[ 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 merge areas of a table.
await PowerPoint.run(async (context) => {
  const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

  // Add a table, specifying one 2x2 merged area.
  shapes.addTable(3, 4, {
    values: [
      ["A", "BB", "CCC", "DDDD"],
      ["E", "FF", "", "HHHH"],
      ["1", "", "", "1234"]
    ],
    mergedAreas: [{ rowIndex: 1, columnIndex: 1, rowCount: 2, columnCount: 2 }]
  });
  await context.sync();
});