Export (0) Print
Expand All

PivotTable.AddFields Method 

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

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)

'Usage
Dim RowFields As Object
Dim ColumnFields As Object
Dim PageFields As Object
Dim AddToTable As Object
Dim returnValue As Object
Dim pivotTable1 As PivotTable
returnValue = pivotTable1.AddFields(RowFields, ColumnFields, PageFields, AddToTable)

object AddFields(
	[In, Optional] object RowFields, 
	[In, Optional] object ColumnFields, 
	[In, Optional] object PageFields, 
	[In, Optional] object AddToTable
);
public System.Object AddFields(
	/*in*/System.Object RowFields, 
	/*in*/System.Object ColumnFields, 
	/*in*/System.Object PageFields, 
	/*in*/System.Object AddToTable
);
function AddFields(
	 RowFields : Object, 
	 ColumnFields : Object, 
	 PageFields : Object, 
	 AddToTable : Object
) : Object;

Parameters

RowFields

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

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

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

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.

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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Community Additions

ADD
Show:
© 2014 Microsoft