---
title: "view.focusCell: Focus Cell — Sheet kit command — Kition"
description: "Highlights the rows and columns of the selection across the grid in a colour (Highlight Rows and Columns, also called Focus Cell). It is the person's view, as the formula bar is: the workbook does not change (no undo step, nothing to save)."
canonical: "https://developer.kition.ai/docs/kits/sheet/commands/view.focusCell"
---

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

# view.focusCell

**Focus Cell.** Highlights the rows and columns of the selection across the grid in a colour (Highlight Rows and Columns, also called Focus Cell). It is the person's view, as the formula bar is: the workbook does not change (no undo step, nothing to save).

- 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

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `color` | `string` | no | the highlight colour, #RRGGBB |
| `on` | `boolean` | no | true turns it on, false off; left out with no color, it toggles |

## Call through sheet_run

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

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

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `color` | `string` | no |  |
| `on` | `boolean` | no |  |

```json
{
  "additionalProperties": false,
  "properties": {
    "color": {
      "type": "string"
    },
    "on": {
      "type": "boolean"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "color": {
      "description": "the highlight colour, #RRGGBB",
      "type": "string"
    },
    "on": {
      "description": "true turns it on, false off; left out with no color, it toggles",
      "type": "boolean"
    }
  },
  "returns": "{on, color}; highlights the selection's rows and columns (高亮行列, the person's view, not saved with the workbook)",
  "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).
