> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Types: editor: Data, sorting and validation

## `ClearWhat`

Import from `@reductoai/xlsx/editor`.

```ts theme={null}
type ClearWhat = "all" | "formats" | "contents" | "hyperlinks"
```

## `DeleteShift`

Import from `@reductoai/xlsx/editor`.

```ts theme={null}
type DeleteShift = "rows" | "cols" | "up" | "left"
```

## `FillDirection`

Import from `@reductoai/xlsx/editor`.

```ts theme={null}
type FillDirection = "down" | "up" | "right" | "left"
```

## `FillSeries`

Excel's Series window. `by` fills each row or each column from its first cell. Linear adds
`step`, Growth multiplies by it, Date adds `step` units; filling stops before a value past
`stop`. `trend` fits the line's numbers (least squares) and overwrites them too.

Import from `@reductoai/xlsx/editor`.

| Name | Type | Description |
| - | - | - |
| `by` | `"rows" \| "columns"` | |
| `step?` | `number` | |
| `stop?` | `number` | |
| `trend?` | `boolean` | |
| `type` | `"linear" \| "growth" \| "date" \| "autoFill"` | |
| `unit?` | `"day" \| "weekday" \| "month" \| "year"` | |

## `FindQuery`

Find and Replace's options; `what` takes Excel's `*`, `?` and `~`.

Import from `@reductoai/xlsx/editor`.

| Name | Type | Description |
| - | - | - |
| `byColumns?` | `boolean` | Search down columns instead of across rows. |
| `lookIn?` | `"formulas" \| "values"` | Formulas (the default) or the values the cells show. Replace always looks in formulas. |
| `matchCase?` | `boolean` | |
| `what` | `string` | |
| `wholeCell?` | `boolean` | Match entire cell contents. |
| `within?` | `"sheet" \| "workbook"` | |

## `GoToSpecial`

One pick of Excel's Go To Special window. One selected cell searches the sheet, a block searches itself.

Import from `@reductoai/xlsx/editor`.

```ts theme={null}
type GoToSpecial = { kind: "constants" | "formulas"; values?: SpecialValue[] } | { allLevels?: boolean; kind: "precedents" | "dependents" } | { kind: "conditionalFormats" | "dataValidation"; same?: boolean } | { kind: "notes" | "blanks" | "currentRegion" | "currentArray" | "rowDifferences" | "columnDifferences" | "lastCell" | "visible" }
```

## `InsertShift`

Import from `@reductoai/xlsx/editor`.

```ts theme={null}
type InsertShift = "rows" | "cols" | "down" | "right"
```

## `Merge`

Not exported by name. You get it from the API.

| Name | Type | Description |
| - | - | - |
| `c1` | `number` | |
| `c2` | `number` | |
| `r1` | `number` | |
| `r2` | `number` | |

## `MergeHow`

Import from `@reductoai/xlsx/editor`.

```ts theme={null}
type MergeHow = "center" | "across" | "cells" | "unmerge"
```

## `PasteOperation`

The sum Paste Special makes of each pasted number and the number under it.

Import from `@reductoai/xlsx/editor`.

```ts theme={null}
type PasteOperation = "none" | "add" | "subtract" | "multiply" | "divide"
```

## `PasteSpecial`

Excel's Paste Special: the held cells pasted in part, summed into the cells under them, or linked.

Import from `@reductoai/xlsx/editor`.

| Name | Type | Description |
| - | - | - |
| `keepWidths?` | `boolean` | Keep Source Column Widths: the copied columns' widths come too. |
| `link?` | `boolean` | Paste Link: each cell gets a formula that points at its copied cell. |
| `operation?` | `PasteOperation` | |
| `skipBlanks?` | `boolean` | A blank copied cell leaves the cell under it as it is. |
| `transpose?` | `boolean` | Rows become columns. |
| `what?` | `PasteWhat` | |

## `PasteWhat`

What Paste Special pastes, named as Excel's `XlPasteType`.

Import from `@reductoai/xlsx/editor`.

```ts theme={null}
type PasteWhat = "all" | "formulas" | "values" | "formats" | "allExceptBorders" | "columnWidths" | "formulasAndNumberFormats" | "valuesAndNumberFormats"
```

## `RemoteMerge`

What another writer's change did, as a shared session reports it.

Import from `@reductoai/xlsx-editor`.

| Name | Type | Description |
| - | - | - |
| `remap` | `(index: number) => number \| null` | |
| `selection` | `EditorSelection` | |
| `sheetsChanged` | `boolean` | |

## `RemoveDuplicatesGuess`

What Data > Remove Duplicates opens with: the list, the header guess, and a name per column.

Import from `@reductoai/xlsx/editor`.

| Name | Type | Description |
| - | - | - |
| `address` | `string` | |
| `columns` | `{ header: string; letter: string }[]` | |
| `headers` | `boolean` | |
| `table` | `string \| null` | The table the list is, whose header row is fixed; null for a plain range. |

## `SortGuess`

What Sort opens with: the range, whether its first row is headers, each column's first-row text and each row; `numbers` when its first value is a number.

Import from `@reductoai/xlsx/editor`.

| Name | Type | Description |
| - | - | - |
| `address` | `string` | |
| `columns` | `{ column: number; header: string; numbers: boolean }[]` | |
| `headers` | `boolean` | |
| `rows` | `{ numbers: boolean; row: number }[]` | |

## `SortLevel`

One level of Sort: a sheet column, one-based (a sheet row when sorting left to right).

Import from `@reductoai/xlsx/editor`.

| Name | Type | Description |
| - | - | - |
| `column` | `number` | |
| `descending?` | `boolean` | |

## `SpecialValue`

The value kinds Go To Special's Constants and Formulas take; all four when left out.

Import from `@reductoai/xlsx/editor`.

```ts theme={null}
type SpecialValue = "numbers" | "text" | "logicals" | "errors"
```

## `TextSplit`

How Text to Columns cuts a cell's text: at delimiter characters, or at character positions.

Import from `@reductoai/xlsx/editor`.

```ts theme={null}
type TextSplit = { consecutive?: boolean; delimiters: string; kind: "delimited"; qualifier?: "\"" | "'" | null } | { breaks: number[]; kind: "fixed" }
```

## `ValidationDropdown`

Not exported by name. You get it from the API.

| Name | Type | Description |
| - | - | - |
| `c` | `number` | |
| `list` | `number` | |
| `r` | `number` | |

## `ValidationPrompt`

The input message a validation shows while one of its cells is selected.

Not exported by name. You get it from the API.

| Name | Type | Description |
| - | - | - |
| `ranges` | `Merge[]` | |
| `text` | `string` | |
| `title` | `string` | |

## `ValidationSpec`

What the Data Validation dialog sets; a null rule is Any value.

Import from `@reductoai/xlsx/editor`.

| Name | Type | Description |
| - | - | - |
| `errorAlert` | `DataValidationErrorAlert` | |
| `ignoreBlanks` | `boolean` | |
| `prompt` | `DataValidationPrompt` | |
| `rule` | `DataValidationRule \| null` | |

## `ValidationState`

Import from `@reductoai/xlsx/editor`.

| Name | Type | Description |
| - | - | - |
| `spec` | `ValidationSpec` | |
| `spread` | `"none" \| "all" \| "some" \| "mixed"` | |
