---
title: "edit.autoFill: AutoFill — Sheet kit command — Kition"
description: "Extends a source range over a target range as the fill handle does: continues series (1, 2, 3…; months), with `extend` a single number counting on too (5, 6, 7, as a person's fill handle drag does), or copies values or formats only."
canonical: "https://developer.kition.ai/docs/kits/sheet/commands/edit.autoFill"
---

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

# edit.autoFill

**AutoFill.** Extends a source range over a target range as the fill handle does: continues series (1, 2, 3…; months), with `extend` a single number counting on too (5, 6, 7, as a person's fill handle drag does), or copies values or formats only.

- 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 |
| --- | --- | --- | --- |
| `mode` | `"series" \| "extend" \| "copy" \| "formats" \| "values"` | no |  |
| `source` | `string` | no | like A1:A2 |
| `target` | `string` | no | like A1:A10 |

## Call through sheet_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `mode`, `source`, `target`. 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": {
    "mode": {
      "enum": [
        "series",
        "extend",
        "copy",
        "formats",
        "values"
      ],
      "type": "string"
    },
    "source": {
      "description": "like A1:A2",
      "type": "string"
    },
    "target": {
      "description": "like A1:A10",
      "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).
