Excel) (PivotTable.DrillDown 方法

使你能够向下钻取到基于 OLAP 或基于 PowerPivot 的多维数据集层次结构中的数据。

语法

表达式。DrillDown (PivotItem、 PivotLine)

表达式 表示 数据透视表 对象的变量。

参数

名称 必需/可选 数据类型 说明
PivotItem 必需 PIVOTITEM 从中执行向下钻取的成员。
PivotLine 可选 Variant 指定操作起始成员所在的数据透视表中的行。 如果未指定 PivotLine,则默认为成员显示的顶部 PivotLine。

返回值

VOID

示例

以下示例代码演示在数据透视表上使用的 DrillDown 方法。

ActiveSheet.PivotTables("PivotTable1").DrillDown ActiveSheet.PivotTables( _
      "PivotTable1").PivotFields("[Customer].[Customer Geography].[Country]"). _
      PivotItems("[Customer].[Customer Geography].[Country].&[Australia]"), _
      ActiveSheet.PivotTables("PivotTable1").PivotRowAxis.PivotLines(1)

以下示例代码演示在数据透视图上使用的 DrillDown 方法。

ActiveChart.PivotLayout.PivotTable.DrillDown ActiveChart.PivotLayout.PivotTable _
      .PivotFields("[Customer].[Customer Geography].[Country]").PivotItems( _
      "[Customer].[Customer Geography].[Country].&[Australia]"), ActiveChart. _
      PivotLayout.PivotTable.PivotRowAxis.PivotLines(1)

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。