Partager via


PivotTable.PivotFields Method

Returns an object that represents either a single PivotTable field (a PivotField object) or a collection of both the visible and hidden fields (a PivotFields object) in the PivotTable report. Read-only.

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

Syntax

'Declaration
Function PivotFields ( _
    Index As Object _
) As Object
'Usage
Dim instance As PivotTable
Dim Index As Object
Dim returnValue As Object

returnValue = instance.PivotFields(Index)
Object PivotFields(
    Object Index
)

Parameters

  • Index
    Type: System.Object

    Optional Object. The name or number of the field to be returned.

Return Value

Type: System.Object

Remarks

For OLAP data sources there are no hidden fields, and the object or collection that’s returned reflects what’s currently visible.

See Also

Reference

PivotTable Interface

PivotTable Members

Microsoft.Office.Interop.Excel Namespace