---
title: "table.setStyle: Modify Table Style — Doc kit command — Kition"
description: "Changes a table style's name, base style or region formatting; default: the current table's style."
canonical: "https://developer.kition.ai/docs/kits/doc/commands/table.setStyle"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/doc/commands/table.setStyle](https://developer.kition.ai/docs/kits/doc/commands/table.setStyle)

# table.setStyle

**Modify Table Style.** Changes a table style's name, base style or region formatting; default: the current table's style.

- Kit: Doc 0.1.0 (.docx); reference: [Doc kit commands](https://developer.kition.ai/docs/kits/doc.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `apply` | `boolean` | no |  |
| `bandSize` | `integer` | no | rows per band |
| `bandedColumns` | `object` | no | a table style region's shortcuts |
| `bandedRows` | `object` | no | a table style region's shortcuts |
| `basedOn` | `string` | no |  |
| `firstColumn` | `object` | no | a table style region's shortcuts |
| `headerRow` | `object` | no | a table style region's shortcuts |
| `lastColumn` | `object` | no | a table style region's shortcuts |
| `lastRow` | `object` | no | a table style region's shortcuts |
| `name` | `string` | no |  |
| `para` | `object` | no | paragraph properties as paragraph.dialog answers them (alignment, indents, spacing…) |
| `style` | `string` | no | default: the current table's |
| `wholeTable` | `object` | no | a table style region's shortcuts |

## Call through doc_run

```text
doc_run {
  "path": "<file>.docx",
  "steps": [{ "command": "table.setStyle" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `apply`, `bandSize`, `bandedColumns`, `bandedRows`, `basedOn`, `firstColumn`, `headerRow`, `lastColumn`, `lastRow`, `name`, `para`, `style`, `wholeTable`. doc_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "apply": {
      "type": "boolean"
    },
    "bandSize": {
      "description": "rows per band",
      "type": "integer"
    },
    "bandedColumns": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "bandedRows": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "basedOn": {
      "type": "string"
    },
    "firstColumn": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "headerRow": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "lastColumn": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "lastRow": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "name": {
      "type": "string"
    },
    "para": {
      "additionalProperties": true,
      "description": "paragraph properties as paragraph.dialog answers them (alignment, indents, spacing…)",
      "type": "object"
    },
    "style": {
      "description": "default: the current table's",
      "type": "string"
    },
    "wholeTable": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/doc-darwin-arm64@0.1.0 and the kit itself (doc_commands through @kition/cli@0.1.1, built from KitionAI/kition-doc@41e14a8).
