> ## 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: Conditional formats

## `ConditionalCellValueOperator`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalCellValueOperator = "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqual" | "LessThanOrEqual"
```

## `ConditionalCellValueRule`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `formula1` | `string \| number` | |
| `formula2?` | `string \| number` | |
| `operator` | `ConditionalCellValueOperator` | |

## `ConditionalColorScaleCriteria`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `maximum` | `ConditionalColorScaleCriterion` | |
| `midpoint?` | `ConditionalColorScaleCriterion` | |
| `minimum` | `ConditionalColorScaleCriterion` | |

## `ConditionalColorScaleCriterion`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `color?` | `string` | |
| `formula?` | `string` | |
| `type` | `ConditionalFormatColorCriterionType` | |

## `ConditionalDataBarAxisFormat`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalDataBarAxisFormat = "Automatic" | "None" | "CellMidPoint"
```

## `ConditionalDataBarDirection`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalDataBarDirection = "Context" | "LeftToRight" | "RightToLeft"
```

## `ConditionalDataBarRule`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `formula?` | `string` | |
| `type` | `ConditionalFormatRuleType` | |

## `ConditionalFormatColorCriterionType`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalFormatColorCriterionType = "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"
```

## `ConditionalFormatIconRuleType`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalFormatIconRuleType = "Number" | "Percent" | "Formula" | "Percentile"
```

## `ConditionalFormatPresetCriterion`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalFormatPresetCriterion = keyof typeof PRESETS
```

## `ConditionalFormatRuleType`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalFormatRuleType = "Automatic" | "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"
```

## `ConditionalFormatType`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalFormatType = "Custom" | "DataBar" | "ColorScale" | "IconSet" | "TopBottom" | "PresetCriteria" | "ContainsText" | "CellValue"
```

## `ConditionalIconCriterion`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `customIcon?` | `Icon` | |
| `formula` | `string` | |
| `operator` | `ConditionalIconCriterionOperator` | |
| `type` | `ConditionalFormatIconRuleType` | |

## `ConditionalIconCriterionOperator`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalIconCriterionOperator = "GreaterThan" | "GreaterThanOrEqual"
```

## `ConditionalPresetCriteriaRule`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `criterion` | `ConditionalFormatPresetCriterion` | |

## `ConditionalRangeBorderIndex`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalRangeBorderIndex = "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight"
```

## `ConditionalRangeBorderLineStyle`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalRangeBorderLineStyle = "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot"
```

## `ConditionalRangeFontUnderlineStyle`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalRangeFontUnderlineStyle = "None" | "Single" | "Double"
```

## `ConditionalTextComparisonRule`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `operator` | `ConditionalTextOperator` | |
| `text` | `string` | |

## `ConditionalTextOperator`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalTextOperator = "Contains" | "NotContains" | "BeginsWith" | "EndsWith"
```

## `ConditionalTopBottomCriterionType`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type ConditionalTopBottomCriterionType = "TopItems" | "TopPercent" | "BottomItems" | "BottomPercent"
```

## `ConditionalTopBottomRule`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `rank` | `number` | |
| `type` | `ConditionalTopBottomCriterionType` | |

## `GraphicRule`

What a data bar or icon set handle needs from its rule.

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

| Name | Type | Description |
| - | - | - |
| `book` | `Book` | |
| `prefix()` | `() => string` | |
| `rule()` | `() => CfRule` | |
| `update()` | `(fn: (r: CfRule) => CfRule) => void` | |

## `Icon`

Import from `@reductoai/xlsx/officejs`.

| Name | Type | Description |
| - | - | - |
| `index` | `number` | |
| `set` | `IconSet` | |

## `IconSet`

Import from `@reductoai/xlsx/officejs`.

```ts theme={null}
type IconSet = keyof typeof ICON_SETS
```
