WorkbookBase.PivotCaches-Methode

Ruft eine Microsoft.Office.Interop.Excel.PivotCaches-Auflistung ab, die alle PivotTable-Caches in der angegebenen Arbeitsmappe darstellt.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

Syntax

'Declaration
Public Function PivotCaches As PivotCaches
public PivotCaches PivotCaches()

Rückgabewert

Typ: Microsoft.Office.Interop.Excel.PivotCaches
Eine Microsoft.Office.Interop.Excel.PivotCaches-Auflistung, die alle PivotTable-Caches in der angegebenen Arbeitsmappe darstellt.

Beispiele

Im folgenden Codebeispiel wird mithilfe der PivotCaches-Methode festgelegt, dass jeder Microsoft.Office.Interop.Excel.PivotCache in der aktuellen Arbeitsmappe bei jedem Öffnen der Arbeitsmappe automatisch aktualisiert wird.

Dieses Beispiel bezieht sich auf eine Anpassung auf Dokumentebene.

Private Sub WorkbookPivotCaches()
    Dim caches As Excel.PivotCaches = Me.PivotCaches()

    If Not (caches Is Nothing) Then
        Dim i As Integer
        For i = 1 To caches.Count
            caches(i).RefreshOnFileOpen = True
        Next i
    End If
End Sub
private void WorkbookPivotCaches()
{
    Excel.PivotCaches caches = this.PivotCaches();

    if (caches != null)
    {
        for (int i = 1; i < caches.Count; i++)
        {
            caches[i].RefreshOnFileOpen = true;
        }
    }
}

.NET Framework-Sicherheit

Siehe auch

Referenz

WorkbookBase Klasse

Microsoft.Office.Tools.Excel-Namespace