Skip to content
本页内容

PivotItem (属性)

返回一个 PivotItem 对象,它代表指定区域左上角所在的数据透视表项。

示例

python
#此示例显示包含 Sheet1 中活动单元格的数据透视表数据项的名称
def test():
    Worksheets.Item("Sheet1").Activate()
    print ("The active cell is in the item " + ActiveCell.PivotItem.Name)
python
#本示例将 A3 单元格所对应的数据项名称设置为“表一”,并显示
def test():
    Range("A3").PivotItem.Value = "表一"
    print(Range("A3").PivotItem.Value)