从Excel电子表格中删除过滤器 [英] Removing a filter from Excel spreadsheet
问题描述
我看到很多关于如何使用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屋!