# Table styling

1. Select the shape by `name` you want to modify. See [here](https://docs.powerpointgeneratorapi.com/knowledge-base/finding-shape-names) to find shape names.
2. To set background colors for specific table cells, use the `data_cells` property.
3. Each cell can include a `cell_properties` object to define its style (e.g., `bg_color`).
4. You can pass multiple rows, each represented as an array of cell definitions or strings.
5. When `data_cells` is used, all table rows are replaced — define every row you need to keep.

Reference: [table](https://docs.powerpointgeneratorapi.com/json-template-syntax/shapes/table "mention")

Download: [input.zip](https://drive.google.com/uc?export=download\&id=1rrEq3p8VyCIjdMcnAdsAtZGU8j4QkN_n) | [output.pptx](https://drive.google.com/uc?export=download\&id=1TWJf2gbVJ6Ab4SGy7zojEHJnt3t8l3IW)

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

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2FcYiA7mZXq4wp3uloB0OQ%2Ftemplate.png?alt=media&#x26;token=f7cbdee2-c71b-47e4-8015-8a63ee345293" alt=""><figcaption></figcaption></figure>

***

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2Fvvion9PgoE0KgxEpEBDA%2Foutput.png?alt=media&#x26;token=c85ed9b3-5f22-4c25-9aa8-374837eae34b" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

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

```json
{
  "presentation": {
    "template": "template.pptx",
    "slides": [
      {
        "slide_index": 0,
        "shapes": [
          {
            "name": "Table 5",
            "data_cells": [
              [
                {
                  "cell_properties": {
                    "bg_color": "#64bbd1"
                  }
                },
                {
                  "cell_properties": {
                    "bg_color": "#64bbd1"
                  }
                },
                {
                  "cell_properties": {
                    "bg_color": "#3c707d"
                  }
                },
                {
                  "cell_properties": {
                    "bg_color": "#3c707d"
                  }
                },
                {
                  "cell_properties": {
                    "bg_color": "#2c535d"
                  }
                },
                {
                  "cell_properties": {
                    "bg_color": "#2c535d"
                  }
                }
              ],
              [
                "",
                "",
                {
                  "cell_properties": {
                    "bg_color": "#ff8686"
                  }
                },
                {
                  "cell_properties": {
                    "bg_color": "#ff8686"
                  }
                },
                "",
                ""
              ]
            ]
          }
        ]
      }
    ]
  }
}
```

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


---

# 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/examples/table/table-styling.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.
