禁用数据透视表功能区

如何使用Aspose.Cells for Python Excel库禁用数据透视表功能区

以下代码通过访问工作表中的数据透视表,并将enable_wizard设置为false来演示此功能。示例数据透视表文件可以从此链接下载。

from aspose.cells import Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# Open the template file containing the pivot table
wb = Workbook("pivot_table_test.xlsx")
# Access the pivot table in the first sheet
pt = wb.worksheets[0].pivot_tables[0]
# Disable ribbon for this pivot table
pt.enable_wizard = False
# Save output file
wb.save("out.xlsx")