# table

Like the textbox shape, the **`table`** shape is used to display simple text or numerical data.

<table><thead><tr><th width="155">Parameter</th><th width="98">Type</th><th width="124">Input</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>String</td><td></td><td><mark style="color:red;">[required if <code>shapeId</code> not provided]</mark> The name of shape to update/manipulate. Find shape names <a href="https://docs.powerpointgeneratorapi.com/knowledge-base/finding-shape-names">here</a>.</td></tr><tr><td>shapeId</td><td>Int</td><td></td><td><mark style="color:red;">[required if <code>name</code> not provided]</mark> A unique identifier of a given shape. This ID is not displayed in the document, it's hidden in the xml. </td></tr><tr><td>data_cells</td><td><mark style="color:blue;">Object</mark></td><td></td><td><mark style="color:yellow;">[optional]</mark> 2-dimensional array of cell values. See <a href="#data_cells-object"><mark style="color:blue;"><strong>data cell object</strong></mark></a> for more information.</td></tr><tr><td>settings</td><td><mark style="color:blue;">Object</mark></td><td></td><td><mark style="color:yellow;">[optional]</mark> An array of shape-level settings. See <a href="../textbox#settings-object"><mark style="color:blue;"><strong>settings object</strong></mark></a> for more information.</td></tr><tr><td>is_hidden</td><td>Boolean</td><td>true; false</td><td><mark style="color:yellow;">[optional]</mark> Hide shape</td></tr><tr><td>remove</td><td>Boolean</td><td>true; false</td><td><mark style="color:yellow;">[optional]</mark> Delete shape </td></tr></tbody></table>

JSON payload

{% code lineNumbers="true" %}

```json
"shapes": [
  {
    "name": "string",
    "data_cells": [],
    "settings": [],
    "is_hidden": boolean,
    "remove": boolean
   },
  {
    "name": "string",
    "data_cells": [],
    "settings": [],
    "is_hidden": boolean,
    "remove": boolean
   } 
]
```

{% endcode %}

***

## data\_cells object

The **`data_cells`** object defines the content of a **table shape**.\
\
It is a **two-dimensional array**, where each inner array represents a **row**, and each element within that row represents a **cell**.

Each cell can be either:

* a **string** (for plain text), or
* an **object** (for rich text and formatting).

<table><thead><tr><th width="191">Parameter</th><th width="112">Type</th><th width="101">Input</th><th>Description</th></tr></thead><tbody><tr><td>text</td><td>String or <mark style="color:blue;">Object</mark></td><td></td><td><p><mark style="color:yellow;">[optional]</mark> Text to display in the textbox.</p><p></p><p>- <strong>String</strong>: A simple way to display plain text.</p><p></p><p>- <strong>Object</strong>: Use for advanced formatting by defining text chunks. See the <a href="#text-object"><mark style="color:blue;"><strong>text object</strong></mark></a> structure.</p></td></tr><tr><td>cell_properties</td><td><mark style="color:blue;">Object</mark></td><td></td><td><mark style="color:yellow;">[optional]</mark> A cell styling object</td></tr></tbody></table>

JSON payload

```json
"data_cells": [
  [
    "Cell A1",
    "Cell B1",
    "Cell C1"
  ],
  [
    "Cell A2",
    {
      "text": [
        {
          "text_run": "Cell",
          "text_properties": {...}
        },
        {
          "text_run": " B2",
          "text_properties": {...}
        }
      ],
      "cell_properties": {...}
    },
    "Cell C2"
  ],
  [
    "Cell A3",
    "Cell B3",
    "Cell C3"
  ]
]
```

***

## \`text\` Object

An array of text objects, where each object represents a part of the text with its own text content and optional properties.

<table><thead><tr><th width="179">Parameter</th><th width="120">Type</th><th width="110">Input</th><th>Description</th></tr></thead><tbody><tr><td>text_run</td><td>String</td><td></td><td><mark style="color:red;">[required]</mark> Text chunk </td></tr><tr><td>text_properties</td><td><mark style="color:blue;">Object</mark></td><td></td><td><mark style="color:yellow;">[optional]</mark> A <a href="#text_properties-object"><mark style="color:blue;"><strong>text styling object</strong></mark></a>. List of font styling parameters to override existing styles for the given chunk of text. </td></tr></tbody></table>

JSON Payload

{% code lineNumbers="true" %}

```json
"text": [
  {
    "text_run": "This is part 1 of my sentence.",
    "text_properties": {}
  },
  {
    "text_run": "This is part 2 of my sentence.",
    "text_properties": {}
  }
]
```

{% endcode %}

***

### text\_properties

Text format properties.&#x20;

<table><thead><tr><th width="181">Parameter</th><th width="126">Type</th><th width="159">Input</th><th width="230">Description</th></tr></thead><tbody><tr><td>font_type</td><td>String</td><td>MS supported <a href="https://learn.microsoft.com/en-us/typography/font-list/#a">font names</a></td><td><mark style="color:yellow;">[optional]</mark> Font type</td></tr><tr><td>font_size</td><td>Integer</td><td>1 to 4000</td><td><mark style="color:yellow;">[optional]</mark> Font size</td></tr><tr><td>font_bold</td><td>Boolean</td><td>true; false</td><td><mark style="color:yellow;">[optional]</mark> Bold </td></tr><tr><td>font_italic</td><td>Boolean</td><td>true; false</td><td><mark style="color:yellow;">[optional]</mark> Italic </td></tr><tr><td>font_color</td><td>String</td><td><p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties">Color name</a>,</p><p>RGB(0,0,0),</p><p><a href="https://www.color-hex.com/">Hex</a></p></td><td><mark style="color:yellow;">[optional]</mark> Set text color</td></tr><tr><td>font_bg_color</td><td>String</td><td><p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties">Color name</a>,</p><p>RGB(0,0,0),</p><p><a href="https://www.color-hex.com/">Hex</a></p></td><td><mark style="color:yellow;">[optional]</mark> Set text background color</td></tr><tr><td>text_indent</td><td>Integer</td><td>0 to 142.24</td><td><mark style="color:yellow;">[optional]</mark> Set text indent</td></tr><tr><td>text_align</td><td>String</td><td><p>left,</p><p>center,</p><p>right,</p><p>justified,</p><p>dist</p></td><td><mark style="color:yellow;">[optional]</mark> Set text alignment</td></tr><tr><td>font_underline</td><td>String</td><td><p>single;</p><p>double;</p><p>heavy;</p><p>dotted</p><p>heavydotted;</p><p>dashed;</p><p>heavydashed;</p><p>heavylongdashed;</p><p>dotdash;</p><p>heavydotdash;</p><p>heavydotdotdash;</p><p>wavy;</p><p>heavywavy;</p><p>doublewavy;</p></td><td><mark style="color:yellow;">[optional]</mark> Various text underline</td></tr><tr><td>text_line_spacing</td><td>Integer</td><td>1 to 1584</td><td><mark style="color:yellow;">[optional]</mark> Spacing between text lines</td></tr><tr><td>new_line</td><td> Boolean</td><td> true; false</td><td><mark style="color:red;">[required]</mark> Create new line within text box</td></tr></tbody></table>

JSON payload

```json
"data_cells": [
  [
    "Cell A1",
    {
      "text": [
        {
          "text_run": "Cell B1",
          "text_properties": {
            "font_type": "string",
            "font_size": numeric,
            "font_bold": boolean,
            "font_italic": boolean,
            "font_color": "string",
            "font_bg_color": "string",
            "text_align": "string",
            "text_indent": numeric,
            "text_line_spacing": numeric,
            "font_underline": "string",	
            "new_line": boolean
          }
        }
      ],
      "cell_properties": {}
    },
    "Cell C1"
  ],
  [
    "Cell A2",
    "Cell B2",
    "Cell C2"
  ],
  [
    "Cell A3",
    "Cell B3",
    "Cell C3"
  ]
]
```

***

## cell\_properties

<table><thead><tr><th width="173">Parameters</th><th width="95.33333333333331">Type</th><th>Input</th><th>Description</th></tr></thead><tbody><tr><td>bg_color</td><td>String</td><td><p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties">Color name</a>,</p><p>RGB(0,0,0),</p><p><a href="https://www.color-hex.com/">Hex</a></p></td><td><mark style="color:yellow;">[optional]</mark> Cell background color</td></tr></tbody></table>

JSON payload

```json
"data_cells": [
  [
    "Cell A1",
    {
      "text": [
        {
          "text_run": "Cell B1",
          "text_properties": {...}
        }
      ],
      "cell_properties": {
        "bg_color": "0,128,0"
      }
    },
    "Cell C1"
  ],
  [
    "Cell A2",
    "Cell B2",
    "Cell C2"
  ],
  [
    "Cell A3",
    "Cell B3",
    "Cell C3"
  ]
]
```

***

## Settings Object

The **`settings`** object contain a list format/styling parameters. &#x20;

Parameters below are available across all shapes, regardless of type.&#x20;

Some shape types (i.e. Charts, Tables, Textboxes) have specific attributes, see shape specific settings pages to learn more.

<table><thead><tr><th width="130">Parameter</th><th width="109">Type</th><th width="243">Input</th><th>Description</th></tr></thead><tbody><tr><td>width</td><td><p>Integer,</p><p>Float</p></td><td><p>0 to 5963.92</p><p> </p></td><td><mark style="color:yellow;">[optional]</mark> Set shape width</td></tr><tr><td>height</td><td><p>Integer,</p><p>Float</p></td><td>0 to 5963.92</td><td><mark style="color:yellow;">[optional]</mark> Set shape height</td></tr><tr><td>left</td><td><p>Integer,</p><p>Float</p></td><td>-5963.92 to 5963.92</td><td><mark style="color:yellow;">[optional]</mark> Set left position</td></tr><tr><td>top</td><td><p>Integer,</p><p>Float</p></td><td>-5963.92 to 5963.92</td><td><mark style="color:yellow;">[optional]</mark> Set top position</td></tr><tr><td>unit</td><td>String</td><td><p>cm,</p><p>pt,</p><p>points</p></td><td><mark style="color:yellow;">[optional]</mark> Set unit of measurement for shape <code>width</code>, <code>height</code>, <code>left</code>, <code>top</code>. Defaults to <code>points</code> if not specifcied. </td></tr><tr><td>fill_color</td><td>String</td><td><p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties">Color name</a>,</p><p>RGB(0,0,0),</p><p><a href="https://www.color-hex.com/">Hex</a></p></td><td><mark style="color:yellow;">[optional]</mark> Set shape background color</td></tr></tbody></table>

JSON payload

{% code lineNumbers="true" %}

```json
"settings": {
  "height": numeric,
  "width": numeric,
  "top": numeric,
  "left": numeric,
  "unit": "string",
  "fill_color": "0,0,0"
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powerpointgeneratorapi.com/json-template-syntax/shapes/table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
