从Excel电子表格中删除过滤器 [英] Removing a filter from Excel spreadsheet

查看:233
本文介绍了从Excel电子表格中删除过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到很多关于如何使用Powershell过滤电子表格的示例,但似乎找不到任何会删除应用于工作表的现有过滤器的代码。我必须使用Powershell而不是VBA。不幸的是,我不熟悉编码
来自己解决这个问题并希望有人能提出建议。谢谢!

解决方案

在Powershell中导入Spire.Xls.dll,您可以通过调用  sheet.AutoFilters.Clear()方法删除过滤器在这个DLL中。我对Powersheel不太熟悉所以我无法为您提供代码示例。






I see many examples of how to filter a spreadsheet using Powershell, but can't seem to find any code that will remove any existing filters that are applied to a sheet. I have to use Powershell and not VBA. Unfortunately, I'm not familiar enough with coding to figure this out on my own and hope someone can give a suggestions. Thanks!

解决方案

Imports the Spire.Xls.dll in Powershell, and you could remove a filter by invoking the sheet.AutoFilters.Clear() method in this dll. I am not quite familiar with Powersheel so i am not able to provide you the code sample.



这篇关于从Excel电子表格中删除过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆