---
title: "file.inspect: Inspect Workbook — Sheet kit command — Kition"
description: "Answers the workbook's structure: sheets, active sheet and cell, selection, defined names, tables, charts, calculation mode, unsaved state and undo history. Use sheet.read or cell.get for cell contents."
canonical: "https://developer.kition.ai/docs/kits/sheet/commands/file.inspect"
---

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

# file.inspect

**Inspect Workbook.** Answers the workbook's structure: sheets, active sheet and cell, selection, defined names, tables, charts, calculation mode, unsaved state and undo history. Use sheet.read or cell.get for cell contents.

- 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: no

## Parameters

None.

## Call through sheet_run

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

The required parameters, with placeholders for their types: not a tested example. sheet_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `activeCell` | `string` | no |  |
| `activeSheet` | `number` | no |  |
| `calcMode` | `string` | no |  |
| `dirty` | `boolean` | no |  |
| `mode` | `string` | no |  |
| `names` | `any[]` | no |  |
| `path` | `any` | no |  |
| `redo` | `any[]` | no |  |
| `selection` | `string` | no |  |
| `sheets` | `object[]` | no |  |
| `theme` | `string` | no |  |
| `title` | `string` | no |  |
| `undo` | `any[]` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "activeCell": {
      "type": "string"
    },
    "activeSheet": {
      "type": "number"
    },
    "calcMode": {
      "type": "string"
    },
    "dirty": {
      "type": "boolean"
    },
    "mode": {
      "type": "string"
    },
    "names": {
      "type": "array"
    },
    "path": {},
    "redo": {
      "type": "array"
    },
    "selection": {
      "type": "string"
    },
    "sheets": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "autofilter": {},
          "cells": {
            "type": "number"
          },
          "charts": {
            "type": "array"
          },
          "comments": {
            "type": "number"
          },
          "conditionalFormats": {
            "type": "number"
          },
          "freeze": {},
          "images": {
            "type": "number"
          },
          "merges": {
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "protected": {
            "type": "boolean"
          },
          "shapes": {
            "type": "number"
          },
          "tabColor": {},
          "tables": {
            "type": "array"
          },
          "usedRange": {
            "type": "string"
          },
          "validations": {
            "type": "number"
          },
          "visibility": {
            "type": "string"
          },
          "zoom": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "theme": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "undo": {
      "type": "array"
    }
  },
  "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).
