Skip to content
本页内容

PivotItemList (对象)

指定的数据透视表中所有 PivotItem 对象的集合。

说明

每个 PivotItem 代表数据透视表字段中的一个项。

使用 PivotCell 对象的 RowItemsColumnItems 属性可返回一个 PivotItemList 集合。

一旦返回了 PivotItemList 集合,您就可以使用 Item 方法来标识某个特定的 PivotItem 列表。

示例

python
#本示例显示包含单元格 L10 的数据透视项行轴上第一个数据项的标签文本
def test():
    # Identify contents associated with PivotItemList.
    print("Contents associated with cell L10: " + Application.Range("L10").PivotCell.RowItems.Item(1).Caption)
python
#本示例将工作表 Sheet1 上包含单元格 L4 的数据透视项行轴上第一个数据项的详细信息设置为不可见
def test():
    pvtItem = Application.Worksheets.Item("Sheet1").Range("L4").PivotCell.RowItems.Item(1)
    pvtItem.ShowDetail = False