PivotTable.PivotFields Method
Excel Developer Reference |
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.
Syntax
expression.PivotFields(Index)
expression An expression that returns a PivotTable object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Index | Optional | Variant | The name or number of the field to be returned. |
Return Value
Object
Remarks
For OLAP data sources, there are no hidden fields, and the object or collection that’s returned reflects what’s currently visible.
Example
This example adds the PivotTable report’s field names to a list on a new worksheet.
Visual Basic for Applications |
---|
|
See Also