---
Product: Aspose.Cells
Platform: typescript
Page Type: reference
Canonical URL: https://reference.aspose.org/cells/typescript/conditionalformat
---

# ConditionalFormat

## Overview

`ConditionalFormat` is a class in Aspose.Cells FOSS for TypeScript.

This class declares 5 methods for ConditionalFormat objects in TypeScript programs.
Available methods include: `addArea`, `addRule`, `getRanges`, `getRules`, `toXml`.
Public members are accessible to any TypeScript application after installing the Aspose.Cells FOSS for TypeScript package.

## Methods

| Signature | Description |
|-----------|-------------|
| `addArea(range: string)` | Calls addArea(range) on this ConditionalFormat instance. |
| `getRanges()` → `CellRange[]` | Returns the ranges. |
| `addRule(rule: ConditionalFormatRule)` | Calls addRule(rule) on this ConditionalFormat instance. |
| `getRules()` → `ConditionalFormatRule[]` | Returns the rules. |
| `toXml()` → `string` | Calls toXml on this ConditionalFormat instance. |

## See Also

- [Aspose.Cells — Enterprise API Reference](https://reference.aspose.com/cells/)