如何使用 xlwings 删除 Excel 过滤器

问题描述 投票:0回答:1

我正在使用 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', 'next', 'previous' 和 'relaunchmode'。我错过了什么?

python excel xlwings
1个回答
-3
投票

你想出来了吗?我运行 dir(wb.sheet[0].api) 时似乎遇到了同样的问题...

© www.soinside.com 2019 - 2024. All rights reserved.