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

# FormatConditionCollection

## Overview

`FormatConditionCollection` is a class in Aspose.Cells FOSS for C++.

Represents a collection of format condition objects.

This class declares 15 methods for FormatConditionCollection objects in C++ programs.
Available methods include: `Add`, `AddArea`, `AddCondition`, `AreasOverlap`, `CompareAreas`, `GetCellArea`, `GetCount`, `GetRangeCount`, `RemoveArea`, `RemoveCondition`, `SortAreas`.
Public members are accessible to any C++ application after installing the Aspose.Cells FOSS for C++ package.

## Methods

| Signature | Description |
|-----------|-------------|
| `GetCount()` → `int` | Gets the number of items. |
| `GetRangeCount()` → `int` | Gets the range count. |
| `Add(area: CellArea, type: FormatConditionType, operatorType: OperatorType, formula1: std::string_view, formula2: std::string_view)` → `int` | Adds the specified item. The area. The type. The operator type. The formula1. The formula2. The zero-based index of the added item. |
| `AddCondition(type: FormatConditionType)` → `int` | Adds the specified condition. The type. The zero-based index of the added item. |
| `AddCondition(type: FormatConditionType, operatorType: OperatorType, formula1: std::string_view, formula2: std::string_view)` → `int` | Adds the specified condition. The type. The operator type. The formula1. The formula2. The zero-based index of the added item. |
| `AddArea(area: CellArea)` | Adds the specified area. The area. |
| `GetCellArea(index: int)` → `CellArea` | Gets the cell area at the specified index. The zero-based index. The cell area. |
| `RemoveArea(index: int)` | Removes the area at the specified index. The zero-based index. |
| `RemoveArea(startRow: int, startColumn: int, totalRows: int, totalColumns: int)` | Removes the area at the specified location. The start row. The start column. The total number of rows. The total number of columns. |
| `RemoveArea(area: CellArea)` | Removes the specified area. The cell area to remove. |
| `RemoveCondition(index: int)` | Removes the condition at the specified index. The zero-based index. |
| `RemoveCondition(owner: std::vector<Core::ConditionalFormattingModel>, collection: Core::ConditionalFormattingModel, model: Core::FormatConditionModel)` | Removes the specified condition. The owner collection. The collection. The model to remove. |
| `AreasOverlap(left: CellArea, right: CellArea)` → `bool` | Determines whether the specified areas overlap. The left area. The right area. true if the areas overlap; otherwise, false. |
| `SortAreas(areas: std::vector<CellArea>)` | Sorts the specified areas. The areas to sort. |
| `CompareAreas(left: CellArea, right: CellArea)` → `int` | Compares two areas for sorting. The left area. The right area. A negative value if left is less than right, zero if equal, positive if greater. |

## See Also

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