Compartir a través de


CalculatedFields Interface

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

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

Syntax

'Declaration
<GuidAttribute("00024420-0000-0000-C000-000000000046")> _
<InterfaceTypeAttribute()> _
Public Interface CalculatedFields _
    Inherits IEnumerable
'Usage
Dim instance As CalculatedFields
[GuidAttribute("00024420-0000-0000-C000-000000000046")]
[InterfaceTypeAttribute()]
public interface CalculatedFields : IEnumerable

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.

See Also

Reference

CalculatedFields Members

Microsoft.Office.Interop.Excel Namespace