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

# DefinedNameCollection

## Overview

`DefinedNameCollection` is a class in Aspose.Cells FOSS for Python.

Collection of defined names in the workbook.

This class declares 6 methods for DefinedNameCollection objects in Python programs.
Available methods include: `__getitem__`, `__init__`, `__iter__`, `__len__`, `add`, `remove`.
Public members are accessible to any Python application after installing the Aspose.Cells FOSS for Python package.

## Methods

| Signature | Description |
|-----------|-------------|
| `__init__()` | Calls __init__ on this DefinedNameCollection instance. |
| `add(name_or_str, refers_to, local_sheet_id)` | Adds a defined name to the collection. |
| `remove(name)` | Removes a defined name by name string. |
| `__getitem__(key)` | Gets a defined name by index or name string. |
| `__len__()` | Calls __len__ on this DefinedNameCollection instance. |
| `__iter__()` | Calls __iter__ on this DefinedNameCollection instance. |

## See Also

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