---
title: "table.insert: Table — Sheet kit command — Kition"
description: "Turns a range (default: the current region) into a structured table with a style, a header row and a name."
canonical: "https://developer.kition.ai/docs/kits/sheet/commands/table.insert"
---

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

# table.insert

**Table.** Turns a range (default: the current region) into a structured table with a style, a header row and a name.

- Kit: Sheet 0.1.0 (.xlsx (and opens .xlsm, .xls, .xltx, .csv, .ods, .xlsb)); reference: [Sheet kit commands](https://developer.kition.ai/docs/kits/sheet.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `clearPictures` | `boolean` | no | pictures in the header row go; without it they refuse the table |
| `columnPrefix` | `string` | no | the generic name for empty headers, numbered (Column1, 列1) |
| `filter` | `boolean` | no | with mode table: whether the header shows filter buttons (default true) |
| `header` | `boolean` | no |  |
| `name` | `string` | no |  |
| `range` | `string` | no | cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection |
| `style` | `string` | no | like TableStyleMedium2 |

## Call through sheet_run

```text
sheet_run {
  "path": "<file>.xlsx",
  "steps": [{ "command": "table.insert" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `clearPictures`, `columnPrefix`, `filter`, `header`, `name`, `range`, `style`. sheet_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": {
    "clearPictures": {
      "description": "pictures in the header row go; without it they refuse the table",
      "type": "boolean"
    },
    "columnPrefix": {
      "description": "the generic name for empty headers, numbered (Column1, 列1)",
      "type": "string"
    },
    "filter": {
      "description": "with mode table: whether the header shows filter buttons (default true)",
      "type": "boolean"
    },
    "header": {
      "default": true,
      "type": "boolean"
    },
    "name": {
      "type": "string"
    },
    "range": {
      "description": "cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection",
      "type": "string"
    },
    "style": {
      "description": "like TableStyleMedium2",
      "type": "string"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/sheet-darwin-arm64@0.1.0 and the kit itself (sheet_commands through @kition/cli@0.1.1, built from KitionAI/kition-sheet@82f13b2).
