语言

PivotTables 接口

定义

指定工作表上所有 PivotTable 对象的集合。

public interface class PivotTables : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("00020873-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface PivotTables : System.Collections.IEnumerable
Public Interface PivotTables
Implements IEnumerable
属性
实现

注解

使用 PivotTables(Object) 方法返回 数据透视表 集合。

使用该 PivotTableWizard(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) 方法创建新的数据透视表并将其添加到集合。

使用 数据透视表 (index) ,其中 index 是数据透视表索引号或名称,以返回单个 数据透视表 对象。

因为对数据透视表进行编程可能会很复杂,所以,最方便的做法是将数据透视表操作录制到宏中,然后再修订所录制的宏代码。 若要录制宏,请指向“工具”菜单上的“宏”,然后单击“录制新宏”。

属性

名称 说明
Application

返回表示 Application Microsoft Excel 应用程序的对象。 只读。

Count

返回集合中对象的数目。 只读 Integer。

Creator

返回一个 32 位整数,该整数指示在其中创建了此对象的应用程序。 如果该对象是在 Microsoft Excel 中创建的,则此属性返回字符串 XCEL,它等同于十六进制的数字 5843454C。 只读 XlCreator。

Parent

返回指定对象的父对象。 只读。

方法

名称 说明
Add(PivotCache, Object, Object, Object, Object)

添加新的数据透视表。 返回对象 PivotTable 。

GetEnumerator()

指定工作表上所有 PivotTable 对象的集合。

Item(Object)

从集合中返回一个对象。

适用于