Modifica

Condividi tramite


PivotTable.AddFields(Object, Object, Object, Object) Method

Definition

Adds row, column, and page fields to a PivotTable report or PivotChart report.

public object AddFields (object RowFields, object ColumnFields, object PageFields, object AddToTable);
Public Function AddFields (Optional RowFields As Object, Optional ColumnFields As Object, Optional PageFields As Object, Optional AddToTable As Object) As Object

Parameters

RowFields
Object

Optional Object. Specifies a field name (or an array of field names) to be added as rows or to be added to the category axis.

ColumnFields
Object

Optional Object. Specifies a field name (or an array of field names) to be added as columns or to be added to the series axis.

PageFields
Object

Optional Object. Specifies a field name (or an array of field names) to be added as pages or to be added to the page area.

AddToTable
Object

Optional Object. Applies only to PivotTable reports. True to add the specified fields to the report (none of the existing fields are replaced). False to replace existing fields with the new fields. The default value is False.

Returns

Remarks

You must specify one of the field arguments.

Field names specify the unique name returned by the SourceName property of the PivotField object.

This method is not available for OLAP data sources.

Applies to