首页 > 解决方案 > 如何使用 xlwings 删除 Excel 过滤器

问题描述

我正在使用 xlwings (0.21.4) 使用来自外部来源的数据更新电子表格。除非任何工作表包含过滤器,否则更新工作正常。我正在寻找一种方法来禁用工作簿中各个工作表中的过滤器。我看过与此类似的其他帖子,其中推荐的解决方案是将 workbook.sheet.api.AutoFilterMode 设置为 False 或使用 workbook.sheet.api.ShowAllData。但是,这些都不存在于 api 中。唯一可用的元素是“after”、“any”、“before”、“beginning”、“beginswith”、“contains”、“doesnotbeginwith”、“doesnotcontain”、“doesnotendwith”、“end”、“endswith” , 'first', 'help', 'isin', 'isnotin', 'isrunning', 'last', 'middle', ' 下一个”、“上一个”和“重新启动模式”。我错过了什么?

标签: pythonexcelxlwings

解决方案


推荐阅读