PivotTable.VisualTotals Property

True (default) to enable Online Analytical Processing (OLAP) PivotTables to recalculate the total after an item has been hidden from view. Read/write Boolean.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Property VisualTotals As Boolean
    Get
    Set
'Usage
Dim instance As PivotTable
Dim value As Boolean

value = instance.VisualTotals

instance.VisualTotals = value
bool VisualTotals { get; set; }

Property Value

Type: System.Boolean

Remarks

In non-OLAP PivotTables, if you hide an item, the total is recomputed to reflect only the items that remain visible in the PivotTable. In an OLAP PivotTable, the total is computed on the server and is therefore unaffected by whether any items are hidden in the PivotTable view. However, if the VisualTotals property is set to False for an OLAP PivotTable, then the results of the OLAP PivotTable will match those of the non-OLAP PivotTable.

For OLAP PivotTables, a VisualTotals property setting of True (default) works the same way as described for non-OLAP PivotTables.

The VisualTotals property returns True for all new PivotTables. However, if you open a workbook in the current version of Microsoft Excel and the PivotTable had been created in a previous version of Excel, the VisualTotals property will return False.

See Also

Reference

PivotTable Interface

PivotTable Members

Microsoft.Office.Interop.Excel Namespace