Skip to content
本页内容

Value (属性)

返回或设置一个 str 值,它代表数据透视表中指定的公式的名称。

示例

python
#本示例显示活动工作表中第一张数据透视表第一个公式的名称
def test():
    pvtFormula = ActiveSheet.PivotTables(1).PivotFormulas(1)
    print(pvtFormula.Value)
python
#本示例显示第一张工作表中数据透视表第二个公式的名称
def test():
    pvtFormula = Worksheets.Item(1).Range("I1").PivotTable.PivotFormulas(2)
    print(pvtFormula.Value)