---
title: "Edit .xlsx spreadsheets with the AI agent in Kition Sheet"
description: "The agent in Kition Desktop works in .xlsx workbooks through Kition Sheet’s commands: it writes values and formulas, formats, sorts, adds charts and pivot tables, checks for formula errors, and works live or in a draft."
canonical: "https://kition.ai/docs/kits/sheet/agent"
---

> Canonical HTML: [https://kition.ai/docs/kits/sheet/agent](https://kition.ai/docs/kits/sheet/agent)

[Docs home](https://kition.ai/docs)

-   Get started
    
    -   [What is Kition Desktop](https://kition.ai/docs/what-is-kition)
    -   [Install Kition Desktop](https://kition.ai/docs/install-kition)
    -   [Open a workspace](https://kition.ai/docs/open-workspace)
    -   [A tour of the window](https://kition.ai/docs/ui-tour)
    -   [Set up AI](https://kition.ai/docs/configure-provider)
    -   [How your API keys are stored](https://kition.ai/docs/secure-api-key)
    -   [Back up a workspace](https://kition.ai/docs/back-up-a-workspace)
-   Scenarios
    
    -   [Real-world scenarios](https://kition.ai/docs/scenarios)
    -   [Generate campaign assets in batches](https://kition.ai/docs/scenarios/campaign-assets)
    -   [How to set up receipt OCR fields in a table](https://kition.ai/docs/scenarios/receipt-ocr)
    -   [How to build a product asset pipeline with connected AI fields](https://kition.ai/docs/scenarios/product-asset-pipeline)
-   Working with kits
    
    -   [The sixteen kits](https://kition.ai/docs/kits/overview)
    -   [Display modes: Menus and Classic](https://kition.ai/docs/kits/display-modes)
    -   [Save, Save As and export](https://kition.ai/docs/kits/save-and-export)
    -   [Find, zoom and comments](https://kition.ai/docs/kits/find-zoom-comments)
    -   [The Viewer for other files](https://kition.ai/docs/kits/viewer)
    -   [Version history](https://kition.ai/docs/kits/version-history)
    -   [Extensions and scripts](https://kition.ai/docs/kits/extensions-and-scripts)
    -   [Command palette](https://kition.ai/docs/kits/command-palette)
-   Doc, Sheet, Slide and PDF
    
    -   [Get started with Kition Doc](https://kition.ai/docs/kits/doc/get-started)
    -   [Export from Kition Doc: PDF, PNG and Save As .docx](https://kition.ai/docs/kits/doc/export)
    -   [Edit .docx documents with the AI agent in Kition Doc](https://kition.ai/docs/kits/doc/agent)
    -   [Get started with Kition Sheet](https://kition.ai/docs/kits/sheet/get-started)
    -   [Export from Kition Sheet: PDF, CSV, PNG and more](https://kition.ai/docs/kits/sheet/export)
    -   [Edit .xlsx spreadsheets with the AI agent in Kition Sheet](https://kition.ai/docs/kits/sheet/agent)
    -   [Get started with Kition Slide](https://kition.ai/docs/kits/slide/get-started)
    -   [Export from Kition Slide: PDF, PNG and JPEG from .pptx](https://kition.ai/docs/kits/slide/export)
    -   [Build .pptx presentations with the AI agent in Kition Slide](https://kition.ai/docs/kits/slide/agent)
    -   [Get started with Kition PDF](https://kition.ai/docs/kits/pdf/get-started)
    -   [Save, protect and share .pdf files from Kition PDF](https://kition.ai/docs/kits/pdf/export)
    -   [Review and fill .pdf files with the AI agent in Kition PDF](https://kition.ai/docs/kits/pdf/agent)
-   HTML, Photo, Vector and Design
    
    -   [Edit .html pages with a live preview in the HTML kit](https://kition.ai/docs/kits/html/get-started)
    -   [Save and share .html pages from the HTML kit](https://kition.ai/docs/kits/html/export)
    -   [Ask the agent to write and fix .html pages](https://kition.ai/docs/kits/html/agent)
    -   [Edit layered .psd and .psb images in the Photo kit](https://kition.ai/docs/kits/photo/get-started)
    -   [Export a .psd as PNG, JPEG, WebP or TIFF](https://kition.ai/docs/kits/photo/export)
    -   [Ask the agent to retouch and export .psd images](https://kition.ai/docs/kits/photo/agent)
    -   [Draw with the Vector kit and open .ai and .eps files](https://kition.ai/docs/kits/vector/get-started)
    -   [Export a .kvector drawing as SVG, PDF, PNG, JPEG or WebP](https://kition.ai/docs/kits/vector/export)
    -   [Ask the agent to draw and arrange .kvector artwork](https://kition.ai/docs/kits/vector/agent)
    -   [Design interfaces in .kdesign files and import .fig and .sketch](https://kition.ai/docs/kits/design/get-started)
    -   [Export a .kdesign as PNG, JPG, SVG, PDF or .fig](https://kition.ai/docs/kits/design/export)
    -   [Ask the agent to build screens and components in .kdesign files](https://kition.ai/docs/kits/design/agent)
-   Film, Motion, CAD and Scene
    
    -   [Get started with Film: edit video from .mp4, .mov and .webm clips](https://kition.ai/docs/kits/film/get-started)
    -   [Export a Film sequence to .mp4 (H.264)](https://kition.ai/docs/kits/film/export)
    -   [Edit a .kfilm video project with the AI agent](https://kition.ai/docs/kits/film/agent)
    -   [Get started with Motion: keyframe titles and motion graphics](https://kition.ai/docs/kits/motion/get-started)
    -   [Export Motion compositions to .mp4, .webm, .gif, PNG sequences or Lottie](https://kition.ai/docs/kits/motion/export)
    -   [Animate a .kmotion project with the AI agent](https://kition.ai/docs/kits/motion/agent)
    -   [Get started with CAD: draw and edit .dxf drawings](https://kition.ai/docs/kits/cad/get-started)
    -   [Export a .dxf drawing to PDF, SVG or PNG](https://kition.ai/docs/kits/cad/export)
    -   [Draft and fix .dxf drawings with the AI agent](https://kition.ai/docs/kits/cad/agent)
    -   [Get started with Scene (Preview): 3D scenes with .glb, .fbx and .usd models](https://kition.ai/docs/kits/scene/get-started)
    -   [Export a 3D scene to .glb, .gltf, .fbx, .usdz, .obj, .stl or a .png render](https://kition.ai/docs/kits/scene/export)
    -   [Build and fix .kscene 3D scenes with the AI agent](https://kition.ai/docs/kits/scene/agent)
-   Notes
    
    -   [Write notes in Markdown](https://kition.ai/docs/editor/markdown-basics)
    -   [Link notes with wikilinks](https://kition.ai/docs/editor/wikilinks-basics)
    -   [Callouts](https://kition.ai/docs/editor/callouts-syntax)
    -   [Start a note from a template](https://kition.ai/docs/editor/doc-templates)
    -   [Embeds and tables in notes](https://kition.ai/docs/editor/embed-table-in-doc)
    -   [Math and Mermaid diagrams](https://kition.ai/docs/editor/math-and-diagrams)
    -   [Export or print a note](https://kition.ai/docs/editor/export-document)
-   Tables
    
    -   [Create a table](https://kition.ai/docs/tables/create-a-table)
    -   [Field types](https://kition.ai/docs/tables/field-types)
    -   [Views and dashboards](https://kition.ai/docs/tables/create-view)
    -   [Filter, sort and group](https://kition.ai/docs/tables/filter-sort-group)
    -   [AI fields](https://kition.ai/docs/tables/ai-field-setup)
    -   [Import CSV, TSV or XLSX](https://kition.ai/docs/tables/csv-import)
    -   [Export a table to CSV or Markdown](https://kition.ai/docs/tables/csv-export)
    -   [Link notes and tables](https://kition.ai/docs/tables/link-doc-and-table)
-   Whiteboards
    
    -   [Create your first board](https://kition.ai/docs/whiteboards/get-started)
    -   [Build a mind map on a board](https://kition.ai/docs/whiteboards/mind-maps)
    -   [Draw a flowchart on a board](https://kition.ai/docs/whiteboards/flowcharts)
    -   [Review the agent’s changes to a board](https://kition.ai/docs/whiteboards/agent-review)
    -   [Export a board as PNG, SVG or PDF](https://kition.ai/docs/whiteboards/export)
-   Layouts
    
    -   [Create a page layout with the Layout kit](https://kition.ai/docs/layout/get-started)
    -   [Start a layout from a template](https://kition.ai/docs/layout/templates)
    -   [Work with layers, styles and swatches in a layout](https://kition.ai/docs/layout/layers)
    -   [Place images and keep the text editable](https://kition.ai/docs/layout/images-and-text)
    -   [Export a layout as PDF, PNG, JPEG, HTML, IDML or EPUB](https://kition.ai/docs/layout/export)
    -   [Make the same layout in several sizes](https://kition.ai/docs/layout/size-variants)
    -   [Review the agent’s changes to a layout](https://kition.ai/docs/layout/agent-review)
-   AI agent
    
    -   [Chat with the agent](https://kition.ai/docs/agent/agent-basics)
    -   [Read the agent's steps](https://kition.ai/docs/agent/agent-tool-calls)
    -   [Live edits and drafts](https://kition.ai/docs/agent/plan-mode)
    -   [Use Claude Code, Codex or Cursor with the kits](https://kition.ai/docs/agent/external-agents)
    -   [Connect MCP servers](https://kition.ai/docs/agent/mcp-setup)
    -   [Research the web with the agent](https://kition.ai/docs/agent/web-research)
    -   [Approve the agent's commands and fetches](https://kition.ai/docs/agent/agent-permissions)
    -   [Keep agent usage and cost down](https://kition.ai/docs/agent/agent-cost-control)
-   Model providers
    
    -   [Connect OpenAI](https://kition.ai/docs/providers/openai-setup)
    -   [Connect Anthropic](https://kition.ai/docs/providers/anthropic-setup)
    -   [Connect a custom provider](https://kition.ai/docs/providers/custom-provider-setup)
    -   [Connect DeepSeek or Kimi](https://kition.ai/docs/providers/common-models-setup)
    -   [Switch the model](https://kition.ai/docs/providers/switch-default-model)
-   Desktop & data
    
    -   [Where Kition keeps its data, cache and logs](https://kition.ai/docs/desktop/log-and-config-locations)
    -   [Update Kition Desktop](https://kition.ai/docs/desktop/app-update)
    -   [Free app, pay-as-you-go AI](https://kition.ai/docs/desktop/free-vs-pro)
    -   [Uninstall Kition and remove its data](https://kition.ai/docs/desktop/uninstall-and-data)
-   Recipes
    
    -   [Build an evidence table for a research report](https://kition.ai/docs/recipes/research-evidence)
    -   [Run a campaign asset review in a table](https://kition.ai/docs/recipes/campaign-review)
    -   [Review product images against the product brief](https://kition.ai/docs/recipes/product-asset-review)
    -   [Hand over a project with its editable files](https://kition.ai/docs/recipes/project-handoff)
    -   [Turn meeting notes into an action table](https://kition.ai/docs/recipes/meeting-actions)
-   Reference & troubleshooting
    
    -   [Settings reference](https://kition.ai/docs/settings)
    -   [Keyboard shortcuts](https://kition.ai/docs/keybindings)
    -   [Privacy: what leaves your computer](https://kition.ai/docs/privacy)
    -   [The agent does not respond](https://kition.ai/docs/agent-not-responding)
    -   [A file won’t open or save](https://kition.ai/docs/file-wont-open)
    -   [A kit feels slow](https://kition.ai/docs/editor-laggy)
    -   [A wikilink opens the wrong note, or none](https://kition.ai/docs/wikilink-broken)
    -   [A CSV or spreadsheet import fails](https://kition.ai/docs/csv-import-fail)
    -   [Export fails](https://kition.ai/docs/pdf-export-fails)
-   Articles
    
    -   [How to open a .ktable template in Kition](https://kition.ai/docs/articles/open-ktable-template-in-kition)
    -   [AI image field attachments not loading: safe troubleshooting steps](https://kition.ai/docs/articles/ai-image-field-attachments-not-loading)
    -   [Receipt OCR missing fields: review and recovery checklist](https://kition.ai/docs/articles/receipt-ocr-missing-fields-review)
    -   [What is Kition? A 5-minute tour of Kition Desktop](https://kition.ai/docs/articles/what-is-kition)
-   Blueprint
    
    -   [How Kition is designed](https://kition.ai/blueprint)

[Docs](https://kition.ai/docs)/Doc, Sheet, Slide and PDF/Edit .xlsx spreadsheets with the AI agent in Kition Sheet

Doc, Sheet, Slide and PDF

# Edit .xlsx spreadsheets with the AI agent in Kition Sheet

The agent in Kition Desktop works in .xlsx workbooks through Kition Sheet’s commands: it writes values and formulas, formats, sorts, adds charts and pivot tables, checks for formula errors, and works live or in a draft.

Updated 2026-12-02

By Kition Docs

Verified against Kition Desktop 0.1.1 (0532c350) on 2026-12-02

## How the agent works in a workbook

The agent uses the Sheet kit’s own tools. `sheet_inspect` reads every sheet with its id, name and used range, and shows the values; a formula cell shows its computed value. `sheet_commands` finds a command by keywords, `sheet_run` runs command steps, `sheet_query` and `sheet_batch` read and edit the workbook’s objects, `sheet_check` lists formula errors and other problems, and `sheet_export` writes a PDF, CSV, web page, picture or template as a new file.

Its commands are the ones the ribbon runs, about 360 of them: `cell.set` (Enter Cell) enters a value or a formula, `range.setValues` fills a range, `data.sort`, `chart.insert`, `conditionalFormat.apply` and so on. The agent names the sheet and the cells it acts on, so it never moves your selection or changes the sheet you are looking at.

## Ask the agent

1.  Open the workbook, open \*\*AI Chat\*\*, and add it with \*\*Add context › Add current document\*\* or an @-mention.
2.  Choose \*\*Live\*\* or \*\*Draft\*\* under \*\*Kit edits\*\* in the composer.
3.  Name the sheet and the cells or columns you mean: “On the Sales sheet, column D…”.
4.  Read the steps in the timeline. After a formula change, ask the agent to read the computed values back.
5.  Check the grid. In Live mode undo what you do not want; in Draft mode review, then merge or discard.

## Example requests

What you can ask and what the agent runs

| You ask | The agent runs |
| --- | --- |
| “In D2:D20, put the share of each row in the total of column C.” | \`cell.set\` with a formula such as \`=C2/SUM($C$2:$C$20)\`, filled down |
| “Add a total row under the data.” | \`cell.set\` with \`=SUM(…)\` or \`formula.autoSum\` |
| “Sort the table by Revenue, largest first.” | \`data.sort\` |
| “Show revenue as currency with no decimals.” | \`format.numberFormat\` |
| “Highlight values under 0 in red.” | \`conditionalFormat.apply\` |
| “Make a column chart of revenue by region.” | \`chart.insert\` |
| “Summarise sales by region in a pivot table.” | \`pivot.insert\` |
| “Paste this CSV text into a new sheet.” | \`sheet.insert\`, then \`data.fromTextCsv\` |
| “Find and fix the #DIV/0! errors.” | \`sheet\_check\`, then a guarded formula |
| “Export the Summary sheet as CSV.” | \`sheet\_export\` |

## Live or Draft

In **Live** mode (the default), “The agent edits open kit documents directly; you can undo its edits.” In **Draft** mode, “The agent edits a draft of open kit documents; you review it and merge or discard it.”

When a draft is ready, the banner says “The agent’s draft is ready for review”. **Review** shows “Document now” beside “With the draft merged” and counts the objects added, changed and removed. **Merge** applies it, and “Undo takes a merge back in one step”; **Discard** drops it. Kition does not let the agent write over a change you made while it worked, and every agent edit is listed in **Version history** as “Edited by the agent”.

## What the agent cannot do here

-   It works only on the workbook Kition opened for it. Commands that name another file by path, such as opening a file or getting data from a file, are not offered; paste data as text instead.
-   Spelling (`spelling.check`) is not available to the agent.
-   The check reports `sheet.formula-error`, `sheet.circular-reference`, `sheet.broken-name`, `sheet.merge-hides-data` and more; a suggested fix runs only when it is what you asked for.
-   The kit’s agent guide (`agent/guide.md` in the Sheet repository) has the full rules for sheet ids, cell addresses and checks.

## Version and sources

This guide describes Kition Desktop as of source 0532c350, checked on 2026-12-02. Connected actions also depend on the configured model provider or service. If your installed version is older, some controls may differ.

-   [Kition releases](https://github.com/KitionAI/kition/releases)
-   [Sheet agent guide](https://github.com/KitionAI/kition-sheet/blob/82f13b2/agent/guide.md)
-   [Sheet check codes](https://github.com/KitionAI/kition-sheet/blob/82f13b2/agent/checks.json)
-   [Sheet kit manifest (agent section)](https://github.com/KitionAI/kition-sheet/blob/82f13b2/kit.json)
-   [Sheet command catalogue](https://github.com/KitionAI/kition-sdk/blob/d3c027b/packages/script/kits/sheet.ts)
-   [Kit tools of the agent](https://github.com/KitionAI/kition/blob/0532c350048bd47cd622bd3803b4bd2f3f8b73bf/crates/kition-agent/src/tools/kits.rs)
-   [Agent export through a kit](https://github.com/KitionAI/kition/blob/0532c350048bd47cd622bd3803b4bd2f3f8b73bf/crates/kition-kits/src/tools/export.rs)
-   [Agent strings (Live and Draft)](https://github.com/KitionAI/kition/blob/0532c350048bd47cd622bd3803b4bd2f3f8b73bf/src/i18n/locales/en-US/agent.json)
-   [Draft review strings](https://github.com/KitionAI/kition/blob/0532c350048bd47cd622bd3803b4bd2f3f8b73bf/src/i18n/locales/en-US/workspace.json)
-   [Version history strings](https://github.com/KitionAI/kition/blob/0532c350048bd47cd622bd3803b4bd2f3f8b73bf/src/i18n/locales/en-US/history.json)

## Related pages

[

### Get started with Kition Sheet

Kition Sheet is the spreadsheet of Kition Desktop: it edits and saves .xlsx and .xlsm workbooks with formulas, formats, tables, charts and pivot tables, and opens .xls, .ods and .csv read only.

](https://kition.ai/docs/kits/sheet/get-started)[

### Export from Kition Sheet: PDF, CSV, PNG and more

Kition Sheet exports a workbook as PDF, a sheet as CSV, CSV UTF-8, a web page or a picture, an .xlsx copy, or an .xltx template, each written as a new file next to the workbook.

](https://kition.ai/docs/kits/sheet/export)[

### Live edits and drafts

Choose whether the agent edits open kit documents live or in a draft, and review, merge or discard the draft it leaves for you.

](https://kition.ai/docs/agent/plan-mode)[

### Chat with the agent

Open AI Chat, start and find chats, point the agent at documents, folders and files, pick a model, and stop a run.

](https://kition.ai/docs/agent/agent-basics)[

### Read the agent's steps

How the agent works through kit commands, and how to read its plan card, tool steps, changed files and the 16-step limit of a turn.

](https://kition.ai/docs/agent/agent-tool-calls)

On this page

-   [How the agent works in a workbook](#section-0)
-   [Ask the agent](#section-1)
-   [Example requests](#section-2)
-   [Live or Draft](#section-3)
-   [What the agent cannot do here](#section-4)
-   [Version and sources](#section-5)

## Ready when you are.

Kition is the open pro suite for AI: 16 professional kits and an agent in one free desktop app, for macOS, Windows and Linux.

[Get Kition Desktop](https://kition.ai/download)[Pricing](https://kition.ai/pricing)
