編輯

共用方式為


CalculatedFields Interface

Definition

A collection of PivotField objects that represents all the calculated fields in the specified PivotTable report.

public interface class CalculatedFields : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("00024420-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface CalculatedFields : System.Collections.IEnumerable
Public Interface CalculatedFields
Implements IEnumerable
Attributes
Implements

Remarks

For example, a report that contains Revenue and Expense fields could have a calculated field named “Profit” and defined as the amount in the Revenue field minus the amount in the Expense field.

For OLAP data sources, you cannot set this collection, and it always returns Nothing.

Use the CalculatedFields() method to return the CalculatedFields collection.

Use CalculatedFields(index), where index is the specified field’s name or index number, to return a single PivotField object from the CalculatedFields collection.

Properties

_Default[Object]

Reserved for internal use.

Application

Returns an Application object that represents the Microsoft Excel application.

Count

Returns the number of objects in the collection.

Creator

Returns a 32-bit integer that indicates the application in which this object was created.

Parent

Returns the parent object for the specified object.

Methods

_Add(String, String)

Reserved for internal use.

Add(String, String, Object)

Creates a new calculated field. Returns a PivotField object.

GetEnumerator()
Item(Object)

Returns a single object from a collection.

Applies to