Aracılığıyla paylaş


WorksheetBase.PivotTables Yöntem

Tek bir Özet Tablo raporu ya da temsil eden bir nesne alır (bir Microsoft.Office.Interop.Excel.PivotTable nesnesi) veya tüm Özet Tablo raporları topluluğu (bir Microsoft.Office.Interop.Excel.PivotTables nesne) çalışma.

Ad alanı:  Microsoft.Office.Tools.Excel
Derleme:  Microsoft.Office.Tools.Excel.v4.0.Utilities (Microsoft.Office.Tools.Excel.v4.0.Utilities.dll içinde)

Sözdizimi

'Bildirim
Public Function PivotTables ( _
    index As Object _
) As Object
public Object PivotTables(
    Object index
)

Parametreler

Dönüş Değeri

Tür: System.Object
Ya da tek bir Özet Tablo raporu temsil eden bir nesne (bir Microsoft.Office.Interop.Excel.PivotTable nesnesi) veya tüm Özet Tablo raporları topluluğu (bir Microsoft.Office.Interop.Excel.PivotTables nesne) çalışma.

Açıklamalar

İsteğe bağlı parametreler

İsteğe bağlı parametreler hakkında daha fazla bilgi için bkz: Office Çözümlerinde İsteğe Bağlı Parametreler.

Örnekler

Aşağıdaki kod örneği PivotTables almak için yöntem Microsoft.Office.Interop.Excel.PivotTables Geçerli çalışma topluluğu ve her Özet Tablo koleksiyonunda yeniler

Bu örnek, bir belge düzeyinde özelleştirme için bulunur.

Private Sub RefreshPivotTables()
    Dim pivotTables1 As Excel.PivotTables = _
        CType(Me.PivotTables(), Excel.PivotTables)

    If pivotTables1.Count > 0 Then
        For Each table As Microsoft.Office.Interop.Excel.PivotTable _
              In pivotTables1
            table.RefreshTable()
        Next
    Else
        MsgBox("This workbook contains no pivot tables.")
    End If
End Sub
private void RefreshPivotTables()
{
    Excel.PivotTables pivotTables1 = 
        (Excel.PivotTables)this.PivotTables(missing);

    if (pivotTables1.Count > 0)
    {
        foreach (Microsoft.Office.Interop.Excel.PivotTable table 
            in pivotTables1)
        {
            table.RefreshTable();
        }
    }
    else
    {
        MessageBox.Show("This workbook contains no pivot tables.");
    }
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

WorksheetBase Sınıf

Microsoft.Office.Tools.Excel Ad Alanı