---
title: "page.margins: Margins — Sheet kit command — Kition"
description: "Sets the active sheet's page margins from a preset or in inches per side, including header and footer distance."
canonical: "https://developer.kition.ai/docs/kits/sheet/commands/page.margins"
---

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

# page.margins

**Margins.** Sets the active sheet's page margins from a preset or in inches per side, including header and footer distance.

- 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 |
| --- | --- | --- | --- |
| `bottom` | `number` | no |  |
| `footer` | `number` | no | inches |
| `header` | `number` | no | inches |
| `left` | `number` | no |  |
| `preset` | `"normal" \| "wide" \| "narrow"` | no |  |
| `right` | `number` | no |  |
| `top` | `number` | no |  |

## Call through sheet_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `bottom`, `footer`, `header`, `left`, `preset`, `right`, `top`. 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": {
    "bottom": {
      "type": "number"
    },
    "footer": {
      "description": "inches",
      "type": "number"
    },
    "header": {
      "description": "inches",
      "type": "number"
    },
    "left": {
      "type": "number"
    },
    "preset": {
      "enum": [
        "normal",
        "wide",
        "narrow"
      ],
      "type": "string"
    },
    "right": {
      "type": "number"
    },
    "top": {
      "type": "number"
    }
  },
  "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).
