标签: python excel openpyxl
我正在尝试通过设置相应的单元格值以编程方式为数据透视表设置过滤器值。
这是我的工作表的样子:
这是我代码的要旨:
# modify the filter value on the worksheet through the cell worksheet["B1"].value = 3
在保存并再次在Excel中打开工作簿后,该值仍为(All)
(All)
这不是实现目标的正确方法吗?
我正在使用:
python@3.8
openpyxl@3.0.3