---
title: "data.filterBy: Filter Column — Sheet kit command — Kition"
description: "Filters one column of the sheet's AutoFilter or of a table's own filter (its header's buttons) by values, blanks, a custom comparison or top/bottom items; rows that do not match are hidden."
canonical: "https://developer.kition.ai/docs/kits/sheet/commands/data.filterBy"
---

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

# data.filterBy

**Filter Column.** Filters one column of the sheet's AutoFilter or of a table's own filter (its header's buttons) by values, blanks, a custom comparison or top/bottom items; rows that do not match are hidden.

- 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 |
| --- | --- | --- | --- |
| `aboveAverage` | `boolean` | no |  |
| `blanks` | `boolean` | no |  |
| `cell` | `string` | no | like B3; a filter's header cell: which filter, the sheet's or a table's, and the column |
| `clear` | `boolean` | no |  |
| `column` | `string` | no | like B; or 0-based offset |
| `custom` | `object` | no | {op: "="\|"<>"\|">"\|">="\|"<"\|"<="\|beginsWith\|endsWith\|contains\|notContains, value: "10", op2?, value2?, and?} |
| `range` | `string` | no | read by the command beside its listed parameters |
| `sheet` | `integer \| string` | no | read by the command beside its listed parameters |
| `table` | `string` | no | a table's own filter |
| `top` | `object` | no | {count, bottom?, percent?} |
| `values` | `any[]` | no |  |

## Call through sheet_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `aboveAverage`, `blanks`, `cell`, `clear`, `column`, `custom`, `range`, `sheet`, `table`, `top`, `values`. 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": {
    "aboveAverage": {
      "type": "boolean"
    },
    "blanks": {
      "type": "boolean"
    },
    "cell": {
      "description": "like B3; a filter's header cell: which filter, the sheet's or a table's, and the column",
      "type": "string"
    },
    "clear": {
      "type": "boolean"
    },
    "column": {
      "description": "like B; or 0-based offset",
      "type": "string"
    },
    "custom": {
      "additionalProperties": true,
      "description": "{op: \"=\"|\"<>\"|\">\"|\">=\"|\"<\"|\"<=\"|beginsWith|endsWith|contains|notContains, value: \"10\", op2?, value2?, and?}",
      "properties": {
        "and": {},
        "op": {
          "description": "\"=\"|\"<>\"|\">\"|\">=\"|\"<\"|\"<=\"|beginsWith|endsWith|contains|notContains"
        },
        "op2": {},
        "value": {
          "description": "like 10",
          "type": "string"
        },
        "value2": {}
      },
      "type": "object"
    },
    "range": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "sheet": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Sheet"
      ]
    },
    "table": {
      "description": "a table's own filter",
      "type": "string"
    },
    "top": {
      "additionalProperties": true,
      "description": "{count, bottom?, percent?}",
      "properties": {
        "bottom": {
          "type": "number"
        },
        "count": {
          "type": "integer"
        },
        "percent": {}
      },
      "type": "object"
    },
    "values": {
      "items": {},
      "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).
