> For the complete documentation index, see [llms.txt](https://docs.powerpointgeneratorapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.powerpointgeneratorapi.com/examples/table/handling-merged-cells.md).

# Handling merged cells

Using the following payload you can add data to all cells, including the merged cells.&#x20;

1. Select the shape by `name` you want to modify. See [here](/knowledge-base/finding-shape-names.md) to find shape names.
2. Each list in \`data\_cells\` denotes a row in your table.&#x20;
3. Each row list must have the same number of list objects. Data from the last merged cell will be rendered to the merged cell in your table shape.

{% hint style="info" %}
Limitation - currently, if your table shape has a merged cell, your payload must have the same number of data points otherwise it will fail. This will be improved very soon.&#x20;
{% endhint %}

Reference: [table](/json-template-syntax/shapes/table.md)

Download: [input.zip](https://drive.google.com/uc?export=download\&id=1mzqgQh2n_HOdh1SiVYvnoY99C-MOW5M4) | [output.pptx](https://drive.google.com/uc?export=download\&id=1glVhMuea6R4df3-OJM4ouOAcJTayg5_L)

{% columns %}
{% column width="41.66666666666667%" %}

<figure><img src="/files/oLfOEI8ZXjswHO6ZYjl4" alt=""><figcaption></figcaption></figure>

***

<figure><img src="/files/r1Lm19wEAiUMnOgCaN81" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column width="58.33333333333333%" %}
{% code lineNumbers="true" %}

```json
{
  "presentation": {
    "template": "template.pptx",
    "slides": [
      {
        "slide_index": 0,
        "shapes": [
          {
            "type": "table",
            "name": "Table 2",
            "data_cells": [
              [
                "A1",
                "A2",
                "A3",
                "A4",
                "A5",
                "A6"
              ],
              [
                "",
                "",
                "B1:B3",
                "B4",
                "B5",
                "B6"
              ],
              [
                "C1",
                "C2",
                "C3",
                "C4",
                "C5",
                "C6"
              ],
              [
                "D1",
                "D2",
                "D3",
                "D4",
                "D5",
                "D6"
              ]
            ]
          }
        ]
      }
    ]
  }
}
```

{% endcode %}
{% endcolumn %}
{% endcolumns %}
