PivotField.DatabaseSort Property
When set to True, manual repositioning of items in a PivotTable field is allowed. Returns True if the field has no manually positioned items. Read/write Boolean.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Property DatabaseSort As Boolean
Get
Set
'Usage
Dim instance As PivotField
Dim value As Boolean
value = instance.DatabaseSort
instance.DatabaseSort = value
bool DatabaseSort { get; set; }
Property Value
Type: System.Boolean
Remarks
The DatabaseSort property returns False if the data source is not an Online Analytical Processing (OLAP) data source.
This property returns True if the data source is OLAP and neither custom ordering nor automatic sorting has been applied to the field.
Setting the DatabaseSort property to True, for an OLAP PivotTable, will remove any custom ordering or automatic sort applied to the field (in other words, the PivotTable reverts to the default behavior when the connection was made).
Setting the DatabaseSort property to False will cause the sort order to be the current order of the items, if no automatic sort is applied.
Setting the DatabaseSort property to either True or False causes an Update.
Setting the DatabaseSort property to True for a non-OLAP source or an OLAP data field causes a run-time error.