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

# DataValidationCollection

## Overview

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

DataValidationCollection.add() creates a new DataValidation object that can be configured and added to a worksheet.

This class declares 5 methods for DataValidationCollection objects in TypeScript programs.
Available methods include: `add`, `clear`, `get`, `remove`, `toXml`.
Public members are accessible to any TypeScript application after installing the Aspose.Cells FOSS for TypeScript package.
Properties: `count`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `count` | `number` | Read | Gets the count. |

## Methods

| Signature | Description |
|-----------|-------------|
| `add()` → `DataValidation` | Creates a new DataValidation instance and adds it to the collection for the worksheet |
| `get(index: number)` → `DataValidation \| undefined` | Calls get(index) on this DataValidationCollection instance. |
| `remove(index: number)` | Calls remove(index) on this DataValidationCollection instance. |
| `clear()` | Calls clear on this DataValidationCollection instance. |
| `toXml()` → `string` | Calls toXml on this DataValidationCollection instance. |

## See Also

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