主题
PivotField (属性)
返回一个 PivotField 对象,它代表指定区域左上角所在的数据透视表字段。
示例
python
#此示例显示包含活动单元格的数据透视表字段的名称
def test():
Worksheets.Item("Sheet1").Activate()
print("The active cell is in the field " + ActiveCell.PivotField.Name)
python
#本示例将 A3 单元格所在的数据透视表字段名设置为“字段一”,并显示
def test():
Range("A3").PivotField.Value = "字段一"
print(Range("A3").PivotField.Value)