---
title: "Aspose::Cells::Tables::TableStyleCollection::AddTableStyle method"
url: "https://reference.aspose.com/cells/cpp/aspose.cells.tables/tablestylecollection/addtablestyle/"
product: "Aspose.Cells for C++ API Reference"
description: "Aspose::Cells::Tables::TableStyleCollection::AddTableStyle method. Adds a custom table style in C++."
---

## TableStyleCollection::AddTableStyle(const U16String\&) method


Adds a custom table style.

```cpp
int32_t Aspose::Cells::Tables::TableStyleCollection::AddTableStyle(const U16String &name)
```


| Parameter | Type | Description |
| --- | --- | --- |
| name | const U16String\& | The table style name. |

## ReturnValue

The index of the table style.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [TableStyleCollection](../)
* Namespace [Aspose::Cells::Tables](../../)
* Library [Aspose.Cells for C++](../../../)
## TableStyleCollection::AddTableStyle(const char16_t*) method


Adds a custom table style.

```cpp
int32_t Aspose::Cells::Tables::TableStyleCollection::AddTableStyle(const char16_t *name)
```


| Parameter | Type | Description |
| --- | --- | --- |
| name | const char16_t* | The table style name. |

## ReturnValue

The index of the table style.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [TableStyleCollection](../)
* Namespace [Aspose::Cells::Tables](../../)
* Library [Aspose.Cells for C++](../../../)
