## NameCollection::Add(const U16String\&) method


Defines a new name.

```cpp
int32_t Aspose::Cells::NameCollection::Add(const U16String &text)
```


| Parameter | Type | Description |
| --- | --- | --- |
| text | const U16String\& | The text to use as the name. |

## ReturnValue

[Name](../../name/) object index.
## Remarks



[Name](../../name/) cannot include spaces and cannot look like cell references.
## See Also

* Class [Vector](../../vector/)
* Class [U16String](../../u16string/)
* Class [NameCollection](../)
* Namespace [Aspose::Cells](../../)
* Library [Aspose.Cells for C++](../../../)
## NameCollection::Add(const char16_t*) method


Defines a new name.

```cpp
int32_t Aspose::Cells::NameCollection::Add(const char16_t *text)
```


| Parameter | Type | Description |
| --- | --- | --- |
| text | const char16_t* | The text to use as the name. |

## ReturnValue

[Name](../../name/) object index.
## Remarks



[Name](../../name/) cannot include spaces and cannot look like cell references.
## See Also

* Class [Vector](../../vector/)
* Class [NameCollection](../)
* Namespace [Aspose::Cells](../../)
* Library [Aspose.Cells for C++](../../../)
