主题
ColumnGrand (属性)
如果数据透视表显示列总计,则该属性值为 True。bool 类型,可读写。
示例
python
#本示例设置数据透视表显示列总计
def test():
pvtTable = Worksheets.Item("Sheet1").Range("A3").PivotTable
pvtTable.ColumnGrand = True
python
#本示例显示活动工作表中第一张数据透视表 ColumnGrand 属性的数据类型,并将其设置为 False
def test():
print(f"第一张数据透视表中ColumnGrand属性的数据类型是:{type(ActiveSheet.PivotTables(1).ColumnGrand)}")
ActiveSheet.PivotTables(1).ColumnGrand = False