## PivotTable::GetDataField method


Gets a [PivotField](../../pivotfield/) object that represents all the data fields in a [PivotTable](../). Read-only. It would only be created when there are two or more data fields in the Data region. Defaultly it is in row region. You can drag it to the row/column region with [PivotTable.AddFieldToArea()](../addfieldtoarea/) method .


>Deprecated
>
>Use PivotTable.ValuesField property instead. 
```cpp
PivotField Aspose::Cells::Pivot::PivotTable::GetDataField()
```

## Remarks


NOTE: This method is now obsolete. Instead, please use PivotTable.ValuesField property. This method will be removed 12 months later since October 2025. **Aspose** apologizes for any inconvenience you may have experienced.


## See Also

* Class [PivotField](../../pivotfield/)
* Class [PivotTable](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
