> ## 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.

# Other classes: Conditional formats

## `CellValueConditionalFormat`

Import from `@reductoai/xlsx/officejs`.

### CellValueConditionalFormat properties

| Name | Type | Description |
| - | - | - |
| `format` | `ConditionalRangeFormat` | read-only |
| `rule` | `ConditionalCellValueRule` | |

### `CellValueConditionalFormat.set()`

```ts theme={null}
set(
  properties: CellValueConditionalFormat | UpdateData<CellValueConditionalFormat>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `CfStore`

The rules of one worksheet, each with a handle token that lives as long as the rule.

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

### CfStore properties

| Name | Type | Description |
| - | - | - |
| `sheet` | `ExcelWorksheet` | read-only |
| `prefix` | `string` | read-only |

### `CfStore.read()`

```ts theme={null}
read(): { rules: CfRule[]; slots: Slot[] }
```

### `CfStore.rule()`

```ts theme={null}
rule(slot: Slot): CfRule
```

### `CfStore.update()`

```ts theme={null}
update(slot: Slot, fn: (r: CfRule) => CfRule): void
```

### `CfStore.write()`

```ts theme={null}
write(rules: CfRule[], slots: Slot[]): void
```

## `ColorScaleConditionalFormat`

Import from `@reductoai/xlsx/officejs`.

### ColorScaleConditionalFormat properties

| Name | Type | Description |
| - | - | - |
| `criteria` | `ConditionalColorScaleCriteria` | |
| `threeColorScale` | `boolean` | read-only |

### `ColorScaleConditionalFormat.set()`

```ts theme={null}
set(
  properties: ColorScaleConditionalFormat | UpdateData<ColorScaleConditionalFormat>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `ConditionalDataBarNegativeFormat`

Import from `@reductoai/xlsx/officejs`.

### ConditionalDataBarNegativeFormat properties

| Name | Type | Description |
| - | - | - |
| `borderColor` | `string` | |
| `fillColor` | `string` | |
| `matchPositiveBorderColor` | `boolean` | |
| `matchPositiveFillColor` | `boolean` | |

### `ConditionalDataBarNegativeFormat.set()`

```ts theme={null}
set(
  properties: ConditionalDataBarNegativeFormat | UpdateData<ConditionalDataBarNegativeFormat>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `ConditionalDataBarPositiveFormat`

Import from `@reductoai/xlsx/officejs`.

### ConditionalDataBarPositiveFormat properties

| Name | Type | Description |
| - | - | - |
| `borderColor` | `string` | "" when the bar has no border. |
| `fillColor` | `string` | |
| `gradientFill` | `boolean` | |

### `ConditionalDataBarPositiveFormat.set()`

```ts theme={null}
set(
  properties: ConditionalDataBarPositiveFormat | UpdateData<ConditionalDataBarPositiveFormat>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `ConditionalFormatRule`

`Excel.ConditionalFormatRule`: a custom format's formula.

Import from `@reductoai/xlsx/officejs`.

### ConditionalFormatRule properties

| Name | Type | Description |
| - | - | - |
| `formula` | `string` | |
| `formulaLocal` | `string` | |
| `formulaR1C1` | `string` | The formula in R1C1, relative to the top-left cell the format covers. |

### `ConditionalFormatRule.set()`

```ts theme={null}
set(
  properties: ConditionalFormatRule | UpdateData<ConditionalFormatRule>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `ConditionalRangeBorder`

Import from `@reductoai/xlsx/officejs`.

### ConditionalRangeBorder properties

| Name | Type | Description |
| - | - | - |
| `sideIndex` | `ConditionalRangeBorderIndex` | read-only |
| `color` | `string \| null` | |
| `style` | `ConditionalRangeBorderLineStyle` | |

### `ConditionalRangeBorder.set()`

```ts theme={null}
set(
  properties: ConditionalRangeBorder | UpdateData<ConditionalRangeBorder>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `ConditionalRangeBorderCollection`

Import from `@reductoai/xlsx/officejs`.

### ConditionalRangeBorderCollection properties

| Name | Type | Description |
| - | - | - |
| `bottom` | `ConditionalRangeBorder` | read-only |
| `count` | `number` | read-only |
| `items` | `ConditionalRangeBorder[]` | read-only |
| `left` | `ConditionalRangeBorder` | read-only |
| `right` | `ConditionalRangeBorder` | read-only |
| `top` | `ConditionalRangeBorder` | read-only |

### `ConditionalRangeBorderCollection.getItem()`

```ts theme={null}
getItem(index: ConditionalRangeBorderIndex): ConditionalRangeBorder
```

### `ConditionalRangeBorderCollection.getItemAt()`

```ts theme={null}
getItemAt(index: number): ConditionalRangeBorder
```

## `ConditionalRangeFill`

Import from `@reductoai/xlsx/officejs`.

### ConditionalRangeFill properties

| Name | Type | Description |
| - | - | - |
| `color` | `string \| null` | |

### `ConditionalRangeFill.clear()`

```ts theme={null}
clear(): void
```

### `ConditionalRangeFill.set()`

```ts theme={null}
set(
  properties: ConditionalRangeFill | UpdateData<ConditionalRangeFill>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `ConditionalRangeFont`

Import from `@reductoai/xlsx/officejs`.

### ConditionalRangeFont properties

| Name | Type | Description |
| - | - | - |
| `bold` | `boolean` | |
| `color` | `string \| null` | |
| `italic` | `boolean` | |
| `strikethrough` | `boolean` | |
| `underline` | `ConditionalRangeFontUnderlineStyle` | |

### `ConditionalRangeFont.clear()`

```ts theme={null}
clear(): void
```

### `ConditionalRangeFont.set()`

```ts theme={null}
set(
  properties: ConditionalRangeFont | UpdateData<ConditionalRangeFont>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `ConditionalRangeFormat`

`Excel.ConditionalRangeFormat`: what a rule lays over the cells it matches.

Import from `@reductoai/xlsx/officejs`.

### ConditionalRangeFormat properties

| Name | Type | Description |
| - | - | - |
| `borders` | `ConditionalRangeBorderCollection` | read-only |
| `fill` | `ConditionalRangeFill` | read-only |
| `font` | `ConditionalRangeFont` | read-only |
| `numberFormat` | `string \| null` | The number format code, or null when the rule keeps the cell's own. |

### `ConditionalRangeFormat.clearFormat()`

```ts theme={null}
clearFormat(): void
```

### `ConditionalRangeFormat.set()`

```ts theme={null}
set(
  properties: ConditionalRangeFormat | UpdateData<ConditionalRangeFormat>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `CustomConditionalFormat`

Import from `@reductoai/xlsx/officejs`.

### CustomConditionalFormat properties

| Name | Type | Description |
| - | - | - |
| `format` | `ConditionalRangeFormat` | read-only |
| `rule` | `ConditionalFormatRule` | read-only |

### `CustomConditionalFormat.set()`

```ts theme={null}
set(
  properties: CustomConditionalFormat | UpdateData<CustomConditionalFormat>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `DataBarConditionalFormat`

`Excel.DataBarConditionalFormat`.

Import from `@reductoai/xlsx/officejs`.

### DataBarConditionalFormat properties

| Name | Type | Description |
| - | - | - |
| `axisColor` | `string` | |
| `axisFormat` | `ConditionalDataBarAxisFormat` | |
| `barDirection` | `ConditionalDataBarDirection` | |
| `lowerBoundRule` | `ConditionalDataBarRule` | |
| `negativeFormat` | `ConditionalDataBarNegativeFormat` | read-only |
| `positiveFormat` | `ConditionalDataBarPositiveFormat` | read-only |
| `showDataBarOnly` | `boolean` | |
| `upperBoundRule` | `ConditionalDataBarRule` | |

### `DataBarConditionalFormat.set()`

```ts theme={null}
set(
  properties: DataBarConditionalFormat | UpdateData<DataBarConditionalFormat>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `IconSetConditionalFormat`

`Excel.IconSetConditionalFormat`.

Import from `@reductoai/xlsx/officejs`.

### IconSetConditionalFormat properties

| Name | Type | Description |
| - | - | - |
| `criteria` | `ConditionalIconCriterion[]` | One per icon, lowest first; setting ignores all but the first criterion's custom icon, as Excel does. |
| `reverseIconOrder` | `boolean` | |
| `showIconOnly` | `boolean` | |
| `style` | `"ThreeArrows" \| "ThreeArrowsGray" \| "ThreeFlags" \| "ThreeTrafficLights1" \| "ThreeTrafficLights2" \| "ThreeSigns" \| "ThreeSymbols" \| "ThreeSymbols2" \| "FourArrows" \| "FourArrowsGray" \| "FourRedToBlack" \| "FourRating" \| "FourTrafficLights" \| "FiveArrows" \| "FiveArrowsGray" \| "FiveRating" \| "FiveQuarters" \| "ThreeStars" \| "ThreeTriangles" \| "FiveBoxes"` | A set with another icon count gets Excel's equal percent bands. |

### `IconSetConditionalFormat.set()`

```ts theme={null}
set(
  properties: IconSetConditionalFormat | UpdateData<IconSetConditionalFormat>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `PresetCriteriaConditionalFormat`

Import from `@reductoai/xlsx/officejs`.

### PresetCriteriaConditionalFormat properties

| Name | Type | Description |
| - | - | - |
| `format` | `ConditionalRangeFormat` | read-only |
| `rule` | `ConditionalPresetCriteriaRule` | |

### `PresetCriteriaConditionalFormat.set()`

```ts theme={null}
set(
  properties: PresetCriteriaConditionalFormat | UpdateData<PresetCriteriaConditionalFormat>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `TextConditionalFormat`

Import from `@reductoai/xlsx/officejs`.

### TextConditionalFormat properties

| Name | Type | Description |
| - | - | - |
| `format` | `ConditionalRangeFormat` | read-only |
| `rule` | `ConditionalTextComparisonRule` | |

### `TextConditionalFormat.set()`

```ts theme={null}
set(
  properties: TextConditionalFormat | UpdateData<TextConditionalFormat>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.

## `TopBottomConditionalFormat`

Import from `@reductoai/xlsx/officejs`.

### TopBottomConditionalFormat properties

| Name | Type | Description |
| - | - | - |
| `format` | `ConditionalRangeFormat` | read-only |
| `rule` | `ConditionalTopBottomRule` | |

### `TopBottomConditionalFormat.set()`

```ts theme={null}
set(
  properties: TopBottomConditionalFormat | UpdateData<TopBottomConditionalFormat>,
  options?: UpdateOptions,
): void
```

Sets several properties at once; a navigation member takes a nested batch.
