Skip to content
本页内容

Item (方法)

PivotLineCells 集合对象在集合中的位置返回特定元素。 此为只读属性。

参数

属性数据类型必填说明
IndexAny必填指定集合的元素的位置。

示例

python
#本示例显示活动工作表上数据透视表行轴上第一条数据透视线的PivotLineCells属性的第一个PivotCell的地址
def test():
    pvtCell = ActiveSheet.Range("I1").PivotTable.PivotRowAxis.PivotLines(1).PivotLineCells.Item(1)
    print(pvtCell.Range.Address())
python
#本示例显示工作表 Sheet1 上第一张数据透视表列轴上第一条数据透视线的PivotLineCells属性的第二个PivotCell对应的数据透视表字段的值
def test():
    pvtLine = Worksheets.Item("Sheet1").PivotTables(1).PivotColumnAxis.PivotLines(1)
    print(pvtLine.PivotLineCells.Item(2).DataField.Value)