## PivotTableCollection::Add(const U16String\&, int32_t, int32_t) method


Adds a new [PivotTable](../../pivottable/) at the specified worksheet row and column position with default options.

```cpp
PivotTable Aspose::Cells::Pivot::PivotTableCollection::Add(const U16String &sourceData, int32_t row, int32_t column)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const U16String\& | The data cell range for the new [PivotTable](../../pivottable/). Example: Sheet1!A1:C8 |
| row | int32_t | The zero-based row index of the upper-left corner for the [PivotTable](../../pivottable/) destination. |
| column | int32_t | The zero-based column index of the upper-left corner for the [PivotTable](../../pivottable/) destination. |

## ReturnValue

The newly created [PivotTable](../../pivottable/) instance.

## See Also

* Class [PivotTable](../../pivottable/)
* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const char16_t*, int32_t, int32_t) method


Adds a new [PivotTable](../../pivottable/) at the specified worksheet row and column position with default options.

```cpp
PivotTable Aspose::Cells::Pivot::PivotTableCollection::Add(const char16_t *sourceData, int32_t row, int32_t column)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const char16_t* | The data cell range for the new [PivotTable](../../pivottable/). Example: Sheet1!A1:C8 |
| row | int32_t | The zero-based row index of the upper-left corner for the [PivotTable](../../pivottable/) destination. |
| column | int32_t | The zero-based column index of the upper-left corner for the [PivotTable](../../pivottable/) destination. |

## ReturnValue

The newly created [PivotTable](../../pivottable/) instance.

## See Also

* Class [PivotTable](../../pivottable/)
* Class [Vector](../../../aspose.cells/vector/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const U16String\&, const U16String\&, const U16String\&) method


Adds a new [PivotTable](../../pivottable/) with legacy Excel 97-2003 layout and style.


>Deprecated
>
>Use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method is equivalent to setting NewPivotTableOptions.IsXlsClassic = true. 
```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const U16String &sourceData, const U16String &destCellName, const U16String &tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const U16String\& | The data for the new [PivotTable](../../pivottable/) cache. |
| destCellName | const U16String\& | The cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const U16String\& | The name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added cache index.
## Remarks



NOTE: This method is obsolete. It is equivalent to calling PivotTableCollection.Add(string, int, int, NewPivotTableOptions) with **NewPivotTableOptions.IsXlsClassic = true**. Please use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method will be removed 12 months after September 2026. Apologies for any inconvenience. 


## See Also

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


Adds a new [PivotTable](../../pivottable/) with legacy Excel 97-2003 layout and style.


>Deprecated
>
>Use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method is equivalent to setting NewPivotTableOptions.IsXlsClassic = true. 
```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const char16_t *sourceData, const char16_t *destCellName, const char16_t *tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const char16_t* | The data for the new [PivotTable](../../pivottable/) cache. |
| destCellName | const char16_t* | The cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const char16_t* | The name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added cache index.
## Remarks



NOTE: This method is obsolete. It is equivalent to calling PivotTableCollection.Add(string, int, int, NewPivotTableOptions) with **NewPivotTableOptions.IsXlsClassic = true**. Please use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method will be removed 12 months after September 2026. Apologies for any inconvenience. 


## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const U16String\&, const U16String\&, const U16String\&, bool) method


Adds a new [PivotTable](../../pivottable/) with legacy Excel 97-2003 layout and style.


>Deprecated
>
>Use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method is equivalent to setting NewPivotTableOptions.IsXlsClassic = true. 
```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const U16String &sourceData, const U16String &destCellName, const U16String &tableName, bool useSameSource)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const U16String\& | The data for the new [PivotTable](../../pivottable/) cache. |
| destCellName | const U16String\& | The cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const U16String\& | The name of the new [PivotTable](../../pivottable/) report. |
| useSameSource | bool | Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory. |

## ReturnValue

The new added cache index.
## Remarks



NOTE: This method is obsolete. It is equivalent to calling PivotTableCollection.Add(string, int, int, NewPivotTableOptions) with **NewPivotTableOptions.IsXlsClassic = true**. Please use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method will be removed 12 months after September 2026. Apologies for any inconvenience. 


## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const char16_t*, const char16_t*, const char16_t*, bool) method


Adds a new [PivotTable](../../pivottable/) with legacy Excel 97-2003 layout and style.


>Deprecated
>
>Use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method is equivalent to setting NewPivotTableOptions.IsXlsClassic = true. 
```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const char16_t *sourceData, const char16_t *destCellName, const char16_t *tableName, bool useSameSource)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const char16_t* | The data for the new [PivotTable](../../pivottable/) cache. |
| destCellName | const char16_t* | The cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const char16_t* | The name of the new [PivotTable](../../pivottable/) report. |
| useSameSource | bool | Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory. |

## ReturnValue

The new added cache index.
## Remarks



NOTE: This method is obsolete. It is equivalent to calling PivotTableCollection.Add(string, int, int, NewPivotTableOptions) with **NewPivotTableOptions.IsXlsClassic = true**. Please use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method will be removed 12 months after September 2026. Apologies for any inconvenience. 


## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const U16String\&, int32_t, int32_t, const U16String\&) method


Adds a new [PivotTable](../../pivottable/) with legacy Excel 97-2003 layout and style.


>Deprecated
>
>Use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method is equivalent to setting NewPivotTableOptions.IsXlsClassic = true. 
```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const U16String &sourceData, int32_t row, int32_t column, const U16String &tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const U16String\& | The data cell range for the new PivotTable.Example : Sheet1!A1:C8 |
| row | int32_t | [Row](../../../aspose.cells/row/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| column | int32_t | [Column](../../../aspose.cells/column/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const U16String\& | The name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added cache index.
## Remarks



NOTE: This method is obsolete. It is equivalent to calling PivotTableCollection.Add(string, int, int, NewPivotTableOptions) with **NewPivotTableOptions.IsXlsClassic = true**. Please use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method will be removed 12 months after September 2026. Apologies for any inconvenience. 


## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const char16_t*, int32_t, int32_t, const char16_t*) method


Adds a new [PivotTable](../../pivottable/) with legacy Excel 97-2003 layout and style.


>Deprecated
>
>Use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method is equivalent to setting NewPivotTableOptions.IsXlsClassic = true. 
```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const char16_t *sourceData, int32_t row, int32_t column, const char16_t *tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const char16_t* | The data cell range for the new PivotTable.Example : Sheet1!A1:C8 |
| row | int32_t | [Row](../../../aspose.cells/row/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| column | int32_t | [Column](../../../aspose.cells/column/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const char16_t* | The name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added cache index.
## Remarks



NOTE: This method is obsolete. It is equivalent to calling PivotTableCollection.Add(string, int, int, NewPivotTableOptions) with **NewPivotTableOptions.IsXlsClassic = true**. Please use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method will be removed 12 months after September 2026. Apologies for any inconvenience. 


## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const U16String\&, int32_t, int32_t, const U16String\&, bool) method


Adds a new [PivotTable](../../pivottable/) with legacy Excel 97-2003 layout and style.


>Deprecated
>
>Use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method is equivalent to setting NewPivotTableOptions.IsXlsClassic = true. 
```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const U16String &sourceData, int32_t row, int32_t column, const U16String &tableName, bool useSameSource)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const U16String\& | The data cell range for the new PivotTable.Example : Sheet1!A1:C8 |
| row | int32_t | [Row](../../../aspose.cells/row/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| column | int32_t | [Column](../../../aspose.cells/column/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const U16String\& | The name of the new [PivotTable](../../pivottable/) report. |
| useSameSource | bool | Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory. |

## ReturnValue

The new added cache index.
## Remarks



NOTE: This method is obsolete. It is equivalent to calling PivotTableCollection.Add(string, int, int, NewPivotTableOptions) with **NewPivotTableOptions.IsXlsClassic = true**. Please use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method will be removed 12 months after September 2026. Apologies for any inconvenience. 


## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const char16_t*, int32_t, int32_t, const char16_t*, bool) method


Adds a new [PivotTable](../../pivottable/) with legacy Excel 97-2003 layout and style.


>Deprecated
>
>Use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method is equivalent to setting NewPivotTableOptions.IsXlsClassic = true. 
```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const char16_t *sourceData, int32_t row, int32_t column, const char16_t *tableName, bool useSameSource)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const char16_t* | The data cell range for the new PivotTable.Example : Sheet1!A1:C8 |
| row | int32_t | [Row](../../../aspose.cells/row/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| column | int32_t | [Column](../../../aspose.cells/column/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const char16_t* | The name of the new [PivotTable](../../pivottable/) report. |
| useSameSource | bool | Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory. |

## ReturnValue

The new added cache index.
## Remarks



NOTE: This method is obsolete. It is equivalent to calling PivotTableCollection.Add(string, int, int, NewPivotTableOptions) with **NewPivotTableOptions.IsXlsClassic = true**. Please use PivotTableCollection.Add(string, int, int, NewPivotTableOptions) overload instead. This method will be removed 12 months after September 2026. Apologies for any inconvenience. 


## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const U16String\&, int32_t, int32_t, const U16String\&, bool, bool) method


Adds a new [PivotTable](../../pivottable/) with legacy Excel 97-2003 layout and style.

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const U16String &sourceData, int32_t row, int32_t column, const U16String &tableName, bool useSameSource, bool isXlsClassic)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const U16String\& | The data cell range for the new PivotTable.Example : Sheet1!A1:C8 |
| row | int32_t | [Row](../../../aspose.cells/row/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| column | int32_t | [Column](../../../aspose.cells/column/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const U16String\& | The name of the new [PivotTable](../../pivottable/) report. |
| useSameSource | bool | Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory. |
| isXlsClassic | bool | Indicates whether add classic pivot table of Excel 97-2003. |

## ReturnValue

The new added cache index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const char16_t*, int32_t, int32_t, const char16_t*, bool, bool) method


Adds a new [PivotTable](../../pivottable/) with legacy Excel 97-2003 layout and style.

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const char16_t *sourceData, int32_t row, int32_t column, const char16_t *tableName, bool useSameSource, bool isXlsClassic)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const char16_t* | The data cell range for the new PivotTable.Example : Sheet1!A1:C8 |
| row | int32_t | [Row](../../../aspose.cells/row/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| column | int32_t | [Column](../../../aspose.cells/column/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const char16_t* | The name of the new [PivotTable](../../pivottable/) report. |
| useSameSource | bool | Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory. |
| isXlsClassic | bool | Indicates whether add classic pivot table of Excel 97-2003. |

## ReturnValue

The new added cache index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const U16String\&, const U16String\&, const U16String\&, bool, bool) method


Adds a new [PivotTable](../../pivottable/).

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const U16String &sourceData, const U16String &cell, const U16String &tableName, bool useSameSource, bool isXlsClassic)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const U16String\& | The data cell range for the new PivotTable.Example : Sheet1!A1:C8 |
| cell | const U16String\& | The cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const U16String\& | The name of the new [PivotTable](../../pivottable/) report. |
| useSameSource | bool | Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory when same data source has been gathered into one pivot cache. |
| isXlsClassic | bool | Indicates whether add classic pivot table of Excel 97-2003. |

## ReturnValue

The new added cache index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const char16_t*, const char16_t*, const char16_t*, bool, bool) method


Adds a new [PivotTable](../../pivottable/).

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const char16_t *sourceData, const char16_t *cell, const char16_t *tableName, bool useSameSource, bool isXlsClassic)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const char16_t* | The data cell range for the new PivotTable.Example : Sheet1!A1:C8 |
| cell | const char16_t* | The cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const char16_t* | The name of the new [PivotTable](../../pivottable/) report. |
| useSameSource | bool | Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory when same data source has been gathered into one pivot cache. |
| isXlsClassic | bool | Indicates whether add classic pivot table of Excel 97-2003. |

## ReturnValue

The new added cache index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const PivotTable\&, const U16String\&, const U16String\&) method


Adds a new [PivotTable](../../pivottable/) based on another [PivotTable](../../pivottable/).

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const PivotTable &pivotTable, const U16String &destCellName, const U16String &tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| pivotTable | const PivotTable\& | The source pivotTable. |
| destCellName | const U16String\& | The cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const U16String\& | The name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added [PivotTable](../../pivottable/) index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [PivotTable](../../pivottable/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const PivotTable\&, const char16_t*, const char16_t*) method


Adds a new [PivotTable](../../pivottable/) based on another [PivotTable](../../pivottable/).

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const PivotTable &pivotTable, const char16_t *destCellName, const char16_t *tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| pivotTable | const PivotTable\& | The source pivotTable. |
| destCellName | const char16_t* | The cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const char16_t* | The name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added [PivotTable](../../pivottable/) index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [PivotTable](../../pivottable/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const PivotTable\&, int32_t, int32_t, const U16String\&) method


Adds a new [PivotTable](../../pivottable/) based on another [PivotTable](../../pivottable/).

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const PivotTable &pivotTable, int32_t row, int32_t column, const U16String &tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| pivotTable | const PivotTable\& | The source pivotTable. |
| row | int32_t | [Row](../../../aspose.cells/row/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| column | int32_t | [Column](../../../aspose.cells/column/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const U16String\& | The name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added [PivotTable](../../pivottable/) index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [PivotTable](../../pivottable/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const PivotTable\&, int32_t, int32_t, const char16_t*) method


Adds a new [PivotTable](../../pivottable/) based on another [PivotTable](../../pivottable/).

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const PivotTable &pivotTable, int32_t row, int32_t column, const char16_t *tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| pivotTable | const PivotTable\& | The source pivotTable. |
| row | int32_t | [Row](../../../aspose.cells/row/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| column | int32_t | [Column](../../../aspose.cells/column/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const char16_t* | The name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added [PivotTable](../../pivottable/) index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [PivotTable](../../pivottable/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const Vector \<U16String\>\&, bool, const PivotPageFields\&, const U16String\&, const U16String\&) method


Adds a new [PivotTable](../../pivottable/)[Object](../../../aspose.cells/object/) to the collection with multiple consolidation ranges as data source.

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const Vector<U16String> &sourceData, bool isAutoPage, const PivotPageFields &pageFields, const U16String &destCellName, const U16String &tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const Vector \<U16String\>\& | The multiple consolidation ranges,such as {"Sheet1!A1:C8","Sheet2!A1:B8"} |
| isAutoPage | bool | Whether auto create a single page field. If true,the following param pageFields will be ignored. |
| pageFields | const PivotPageFields\& | The pivot page field items. |
| destCellName | const U16String\& | destCellName The name of the new [PivotTable](../../pivottable/) report. |
| tableName | const U16String\& | the name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added [PivotTable](../../pivottable/) index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotPageFields](../../pivotpagefields/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const Vector \<U16String\>\&, bool, const PivotPageFields\&, const char16_t*, const char16_t*) method


Adds a new [PivotTable](../../pivottable/)[Object](../../../aspose.cells/object/) to the collection with multiple consolidation ranges as data source.

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const Vector<U16String> &sourceData, bool isAutoPage, const PivotPageFields &pageFields, const char16_t *destCellName, const char16_t *tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const Vector \<U16String\>\& | The multiple consolidation ranges,such as {"Sheet1!A1:C8","Sheet2!A1:B8"} |
| isAutoPage | bool | Whether auto create a single page field. If true,the following param pageFields will be ignored. |
| pageFields | const PivotPageFields\& | The pivot page field items. |
| destCellName | const char16_t* | destCellName The name of the new [PivotTable](../../pivottable/) report. |
| tableName | const char16_t* | the name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added [PivotTable](../../pivottable/) index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotPageFields](../../pivotpagefields/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const Vector \<U16String\>\&, bool, const PivotPageFields\&, int32_t, int32_t, const U16String\&) method


Adds a new [PivotTable](../../pivottable/)[Object](../../../aspose.cells/object/) to the collection with multiple consolidation ranges as data source.

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const Vector<U16String> &sourceData, bool isAutoPage, const PivotPageFields &pageFields, int32_t row, int32_t column, const U16String &tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const Vector \<U16String\>\& | The multiple consolidation ranges,such as {"Sheet1!A1:C8","Sheet2!A1:B8"} |
| isAutoPage | bool | Whether auto create a single page field. If true,the following param pageFields will be ignored |
| pageFields | const PivotPageFields\& | The pivot page field items. |
| row | int32_t | [Row](../../../aspose.cells/row/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| column | int32_t | [Column](../../../aspose.cells/column/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const U16String\& | The name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added [PivotTable](../../pivottable/) index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotPageFields](../../pivotpagefields/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
## PivotTableCollection::Add(const Vector \<U16String\>\&, bool, const PivotPageFields\&, int32_t, int32_t, const char16_t*) method


Adds a new [PivotTable](../../pivottable/)[Object](../../../aspose.cells/object/) to the collection with multiple consolidation ranges as data source.

```cpp
int32_t Aspose::Cells::Pivot::PivotTableCollection::Add(const Vector<U16String> &sourceData, bool isAutoPage, const PivotPageFields &pageFields, int32_t row, int32_t column, const char16_t *tableName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceData | const Vector \<U16String\>\& | The multiple consolidation ranges,such as {"Sheet1!A1:C8","Sheet2!A1:B8"} |
| isAutoPage | bool | Whether auto create a single page field. If true,the following param pageFields will be ignored |
| pageFields | const PivotPageFields\& | The pivot page field items. |
| row | int32_t | [Row](../../../aspose.cells/row/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| column | int32_t | [Column](../../../aspose.cells/column/) index of the cell in the upper-left corner of the [PivotTable](../../pivottable/) report's destination range. |
| tableName | const char16_t* | The name of the new [PivotTable](../../pivottable/) report. |

## ReturnValue

The new added [PivotTable](../../pivottable/) index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [PivotPageFields](../../pivotpagefields/)
* Class [PivotTableCollection](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
