PPTX

Tables

Create tables with merged cells, custom styling, and formatted content

Use the table property to add structured tabular data to slides.

Basic Table

{
  "slides": [
    {
      "children": [
        {
          "table": {
            "x": "1.3cm",
            "y": "1.3cm",
            "width": "21.2cm",
            "height": "7.9cm",
            "rows": [
              { "cells": [{ "text": "Name" }, { "text": "Role" }, { "text": "Department" }] },
              { "cells": [{ "text": "Alice" }, { "text": "Engineer" }, { "text": "Dev" }] },
              { "cells": [{ "text": "Bob" }, { "text": "Designer" }, { "text": "UX" }] }
            ]
          }
        }
      ]
    }
  ]
}

Cell Formatting

Use children with paragraph objects for formatted cell content:

{
  "slides": [
    {
      "children": [
        {
          "table": {
            "x": "1.3cm",
            "y": "1.3cm",
            "width": "21.2cm",
            "height": "7.9cm",
            "rows": [
              {
                "cells": [
                  {
                    "fill": "2E74B5",
                    "verticalAlign": "center",
                    "children": [
                      {
                        "children": [
                          { "text": "Header", "bold": true, "size": 14, "fill": "FFFFFF" }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "cells": [
                  {
                    "fill": "F2F2F2",
                    "children": [
                      {
                        "children": [{ "text": "Data cell", "size": 12 }]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        }
      ]
    }
  ]
}

Rich Cell Content

Cells can contain multiple paragraphs:

{
  cells: [
    {
      children: [
        { children: [{ text: "Bold title", bold: true, size: 14 }] },
        { children: [{ text: "Description", size: 11, fill: "666666" }] },
      ],
    },
  ],
}

Merged Cells

Merge cells using rowSpan and columnSpan:

{
  "slides": [
    {
      "children": [
        {
          "table": {
            "x": "1.3cm",
            "y": "1.3cm",
            "width": "21.2cm",
            "height": "9.3cm",
            "rows": [
              {
                "cells": [{ "text": "Category", "rowSpan": 2 }, { "text": "Q1" }, { "text": "Q2" }]
              },
              {
                "cells": [{ "text": "100" }, { "text": "120" }]
              },
              {
                "cells": [
                  { "text": "Products", "rowSpan": 2 },
                  { "text": "200" },
                  { "text": "250" }
                ]
              },
              { "cells": [{ "text": "210" }, { "text": "270" }] }
            ]
          }
        }
      ]
    }
  ]
}

Column Widths

Control column widths explicitly:

{
  "slides": [
    {
      "children": [
        {
          "table": {
            "x": "1.3cm",
            "y": "1.3cm",
            "width": "21.2cm",
            "columnWidths": [200, 300, 300],
            "rows": [
              { "cells": [{ "text": "ID" }, { "text": "Name" }, { "text": "Email" }] },
              { "cells": [{ "text": "1" }, { "text": "Alice" }, { "text": "alice@example.com" }] }
            ]
          }
        }
      ]
    }
  ]
}

Borders

Customize cell borders:

{
    text: "Cell with border",
    borders: {
        top: { width: 2, color: "2E74B5" },
        bottom: { width: 2, color: "2E74B5" },
        left: { width: 2, color: "2E74B5" },
        right: { width: 2, color: "2E74B5" },
    },
}

Table-level borders distribute to edge cells:

{
  "slides": [
    {
      "children": [
        {
          "table": {
            "x": "1.3cm",
            "y": "1.3cm",
            "width": "21.2cm",
            "rows": [
              { "cells": [{ "text": "A" }, { "text": "B" }] },
              { "cells": [{ "text": "C" }, { "text": "D" }] }
            ],
            "borders": {
              "top": { "width": 2, "color": "2E74B5" },
              "bottom": { "width": 2, "color": "2E74B5" },
              "left": { "width": 2, "color": "2E74B5" },
              "right": { "width": 2, "color": "2E74B5" }
            }
          }
        }
      ]
    }
  ]
}

Table Options

PropertyTypeDescription
xnumber | UniversalMeasureHorizontal position
ynumber | UniversalMeasureVertical position
widthnumber | UniversalMeasureFrame width
heightnumber | UniversalMeasureFrame height
rowsTableRowOptions[]Table rows
columnWidthsnumber[]Width for each column
bordersobjectTable-level edge borders
firstRowbooleanBold first row styling
bandRowbooleanAlternating row banding

Cell Options

PropertyTypeDescription
textstringPlain text content
children(ParagraphDescriptorOptions | string)[]Paragraph objects
fillFillOptionsCell background fill
bordersobjectCell borders
columnSpannumberHorizontal merge count
rowSpannumberVertical merge count
verticalAlign"top" | "center" | "bottom" | "justify" | "distribute"Vertical text alignment
vert"horz" | "vert" | "vert270" | "wordArt" | "wordArtV"Text direction within the cell (a:tcPr @vert)
margins{ top, bottom, left, right }Cell padding

Border Options

PropertyTypeDescription
widthnumber | UniversalMeasureBorder width
colorstringHex color
dash"solid" | "dash" | "dashDot" | "lgDash" | ...Dash style
Copyright © 2026