> ## 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: OfficeJS: Data, sorting and validation

## `AutoFillType`

`Excel.AutoFillType`; `FlashFill` is not supported.

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type AutoFillType = "FillDefault" | "FillCopy" | "FillSeries" | "FillFormats" | "FillValues" | "FillDays" | "FillWeekdays" | "FillMonths" | "FillYears" | "LinearTrend" | "GrowthTrend" | "FlashFill"
```

## `BasicDataValidation`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `formula1` | `ValidationBound` | |
| `formula2?` | `ValidationBound` | |
| `operator` | `DataValidationOperator` | |

## `ClearApplyTo`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ClearApplyTo = "All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks"
```

## `CustomDataValidation`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `formula` | `string` | |

## `DataValidationAlertStyle`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type DataValidationAlertStyle = "Stop" | "Warning" | "Information"
```

## `DataValidationErrorAlert`

Import from `@reductoai/xlsx/editor`, `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `message` | `string` | |
| `showAlert` | `boolean` | |
| `style` | `DataValidationAlertStyle` | |
| `title` | `string` | |

## `DataValidationOperator`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type DataValidationOperator = "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqualTo" | "LessThanOrEqualTo"
```

## `DataValidationPrompt`

Import from `@reductoai/xlsx/editor`, `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `message` | `string` | |
| `showPrompt` | `boolean` | |
| `title` | `string` | |

## `DataValidationRule`

Import from `@reductoai/xlsx/editor`, `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `custom?` | `CustomDataValidation` | |
| `date?` | `DateTimeDataValidation` | |
| `decimal?` | `BasicDataValidation` | |
| `list?` | `ListDataValidation` | |
| `textLength?` | `BasicDataValidation` | |
| `time?` | `DateTimeDataValidation` | |
| `wholeNumber?` | `BasicDataValidation` | |

## `DataValidationType`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type DataValidationType = "None" | "WholeNumber" | "Decimal" | "List" | "Date" | "Time" | "TextLength" | "Custom" | "Inconsistent" | "MixedCriteria"
```

## `DateTimeDataValidation`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type DateTimeDataValidation = BasicDataValidation
```

## `DeleteShiftDirection`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type DeleteShiftDirection = "Up" | "Left"
```

## `FilterAction`

VBA's `XlFilterAction`.

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

```ts theme={null}
type FilterAction = "FilterInPlace" | "FilterCopy"
```

## `FilterCriteria`

`Excel.FilterCriteria`.

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `color?` | `string` | |
| `criterion1?` | `string` | |
| `criterion2?` | `string` | |
| `dynamicCriteria?` | `string` | |
| `filterOn` | `FilterOn` | |
| `icon?` | `Icon` | |
| `operator?` | `"And" \| "Or"` | |
| `values?` | `string[]` | |

## `FilterOn`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type FilterOn = "BottomItems" | "BottomPercent" | "CellColor" | "Dynamic" | "FontColor" | "Values" | "TopItems" | "TopPercent" | "Icon" | "Custom"
```

## `InsertShiftDirection`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type InsertShiftDirection = "Down" | "Right"
```

## `InsertWorksheetOptions`

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

| Name | Type | Description |
| - | - | - |
| `positionType?` | `"None" \| "Before" \| "After" \| "Beginning" \| "End"` | |
| `relativeTo?` | `ExcelWorksheet \| string` | |
| `sheetNamesToInsert?` | `string[]` | |

## `LabelFilterCondition`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type LabelFilterCondition = "Unknown" | "Equals" | "BeginsWith" | "EndsWith" | "Contains" | "GreaterThan" | "LessThan" | "Between"
```

## `ListDataValidation`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `inCellDropDown` | `boolean` | |
| `source` | `string \| ExcelRange` | |

## `RemoveDuplicatesResult`

`Excel.RemoveDuplicatesResult`.

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

| Name | Type | Description |
| - | - | - |
| `removed` | `number` | |
| `uniqueRemaining` | `number` | |

## `ReplaceCriteria`

`Excel.ReplaceCriteria` and `Excel.WorksheetSearchCriteria`.

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

| Name | Type | Description |
| - | - | - |
| `completeMatch?` | `boolean` | |
| `matchCase?` | `boolean` | |

## `SearchCriteria`

`Excel.SearchCriteria`.

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

| Name | Type | Description |
| - | - | - |
| `completeMatch?` | `boolean` | |
| `matchCase?` | `boolean` | |
| `searchDirection?` | `"Forward" \| "Backwards"` | |

## `SortBy`

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

```ts theme={null}
type SortBy = "Ascending" | "Descending"
```

## `SortDataOption`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type SortDataOption = "Normal" | "TextAsNumber"
```

## `SortField`

`Excel.SortField`: `key` is a column offset from the left of the range (a row offset when sorting columns).

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `ascending?` | `boolean` | |
| `color?` | `string` | The fill or font colour a colour level puts on top; "" is no fill or the automatic font colour. |
| `dataOption?` | `SortDataOption` | |
| `icon?` | `Icon` | |
| `key` | `number` | |
| `sortOn?` | `SortOn` | |
| `subField?` | `string` | |

## `SortMethod`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type SortMethod = "PinYin" | "StrokeCount"
```

## `SortOn`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type SortOn = "Value" | "CellColor" | "FontColor" | "Icon"
```

## `SortOrientation`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type SortOrientation = "Rows" | "Columns"
```

## `SpecialCellType`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type SpecialCellType = "ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible"
```

## `SpecialCellValueType`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type SpecialCellValueType = "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text"
```

## `ValidationBound`

A bound: a number, a date, formula text with `=`, or a range to read.

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ValidationBound = string | number | Date | ExcelRange
```

## `ValueFilterCondition`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ValueFilterCondition = "Unknown" | "Equals" | "GreaterThan" | "GreaterThanOrEqualTo" | "LessThan" | "LessThanOrEqualTo" | "Between" | "TopN" | "BottomN"
```
