Freigeben über


PowerPoint.FillProperties interface

Stellt die Füllformatierung einer Tabellenzelle dar.

Hinweise

[ API-Satz: PowerPointApi 1.8 ]

Beispiele

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml

// Specifies the font formatting and fill colors of the cells in a table.
await PowerPoint.run(async (context) => {
  const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

  // Add a table, specifying font formatting and fill colors.
  shapes.addTable(3, 4, {
    values: [
      ["A", "BB", "CCC", "DDDD"],
      ["E", "FF", "GGG", "HHHH"],
      ["1", "12", "123", "1234"]
    ],
    specificCellProperties: [
      [
        { fill: { color: "red" }, font: { color: "yellow", name: "Calibri" } },
        { fill: { color: "#0048ba" }, font: { color: "yellow", name: "Coolvetica" } },
        { fill: { color: "red" }, font: { color: "yellow", italic: true } },
        { fill: { color: "red" }, font: { color: "#9966cc", strikethrough: true } }
      ],
      [
        { fill: { color: "#fbceb1" }, font: { color: "yellow", doubleStrikethrough: true } },
        { fill: { color: "red" }, font: { color: "yellow", subscript: true } },
        { fill: { color: "#0048ba" }, font: { color: "yellow", superscript: true } },
        { fill: { color: "red" }, font: { color: "yellow" } }
      ],
      [
        { fill: { color: "red" }, font: { color: "#b0bf1a" } },
        { fill: { color: "#9966cc" }, font: { color: "yellow" } },
        { fill: { color: "#b0bf1a" }, font: { color: "yellow" } },
        { fill: { color: "red" }, font: { color: "#fbceb1" } }
      ]
    ]
  });
  await context.sync();
});

Eigenschaften

color

Stellt die Füllfarbe der Form im Hexadezimalformat #RRGGBB (z. B. "FFA500") oder als benannten HTML-Farbwert (z. B. "orange") dar.

transparency

Gibt den Transparenzprozentsatz der Füllung als Wert von 0,0 (undurchsichtig) bis 1,0 (klar) an.

Details zur Eigenschaft

color

Stellt die Füllfarbe der Form im Hexadezimalformat #RRGGBB (z. B. "FFA500") oder als benannten HTML-Farbwert (z. B. "orange") dar.

color?: string | undefined;

Eigenschaftswert

string | undefined

Hinweise

[ API-Satz: PowerPointApi 1.8 ]

Beispiele

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml

// Specifies the font formatting and fill colors of the cells in a table.
await PowerPoint.run(async (context) => {
  const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

  // Add a table, specifying font formatting and fill colors.
  shapes.addTable(3, 4, {
    values: [
      ["A", "BB", "CCC", "DDDD"],
      ["E", "FF", "GGG", "HHHH"],
      ["1", "12", "123", "1234"]
    ],
    specificCellProperties: [
      [
        { fill: { color: "red" }, font: { color: "yellow", name: "Calibri" } },
        { fill: { color: "#0048ba" }, font: { color: "yellow", name: "Coolvetica" } },
        { fill: { color: "red" }, font: { color: "yellow", italic: true } },
        { fill: { color: "red" }, font: { color: "#9966cc", strikethrough: true } }
      ],
      [
        { fill: { color: "#fbceb1" }, font: { color: "yellow", doubleStrikethrough: true } },
        { fill: { color: "red" }, font: { color: "yellow", subscript: true } },
        { fill: { color: "#0048ba" }, font: { color: "yellow", superscript: true } },
        { fill: { color: "red" }, font: { color: "yellow" } }
      ],
      [
        { fill: { color: "red" }, font: { color: "#b0bf1a" } },
        { fill: { color: "#9966cc" }, font: { color: "yellow" } },
        { fill: { color: "#b0bf1a" }, font: { color: "yellow" } },
        { fill: { color: "red" }, font: { color: "#fbceb1" } }
      ]
    ]
  });
  await context.sync();
});

transparency

Gibt den Transparenzprozentsatz der Füllung als Wert von 0,0 (undurchsichtig) bis 1,0 (klar) an.

transparency?: number | undefined;

Eigenschaftswert

number | undefined

Hinweise

[ API-Satz: PowerPointApi 1.8 ]