---
title: "Aspose::Cells::Pivot::PivotItemCollection::SwapItem method"
url: "https://reference.aspose.com/cells/cpp/aspose.cells.pivot/pivotitemcollection/swapitem/"
product: "Aspose.Cells for C++ API Reference"
description: "Aspose::Cells::Pivot::PivotItemCollection::SwapItem method. Directly swap two items in C++."
---

## PivotItemCollection::SwapItem method


Directly swap two items.

```cpp
void Aspose::Cells::Pivot::PivotItemCollection::SwapItem(int32_t index1, int32_t index2)
```


| Parameter | Type | Description |
| --- | --- | --- |
| index1 | int32_t |  |
| index2 | int32_t |  |

## See Also

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