[英]How to identify which cell(s)/column(s) have Filters set?
I am using Microsoft Interop to read the data. 我正在使用Microsoft Interop读取数据。
In excel-sheet, multiple random columns have "filters" set. 在excel工作表中,多个随机列设置了“过滤器”。 How do I find out which cells /columns have filters set?
我如何找出设置了过滤器的单元格/列? I would like lo load only the columns that have filters set.
我想只加载设置了过滤条件的列。
here is how the sheet looks like 这是床单的样子
row 1-5, col 1-10 [long text describes the data in the sheet, i do not want to load ] 第1-5行,列1-10 [长文本描述了工作表中的数据,我不想加载]
row 1-10, col 1 [some data, not filtered, i do not want to load] 第1-10行,第1列[某些数据,未过滤,我不想加载]
row 1-10, col 2-15 [filter set for some columns only, i would like to detect the filters and load the entire column data ] 第1-10行,第2-15行[仅针对某些列设置过滤器,我想检测过滤器并加载整个列数据]
Worksheet
interface has an AutoFilter
property that returns an AutoFilter
interface. Worksheet
接口具有一个AutoFilter
属性,该属性返回一个AutoFilter
接口。 AutoFilter
interface has a Filters
property that returns a Filters
interface. AutoFilter
接口具有一个Filters
属性,该属性返回一个Filters
接口。 AutoFilter
interface has a Range
property that returns the range being filtered. AutoFilter
接口具有Range
属性,该属性返回要过滤的范围。 Filters
interface is a collection of Filter
s; Filters
接口是Filter
的集合; these are in the same order as the columns in AutoFilter.Range
AutoFilter.Range
的列的顺序相同 Filter
interface has an On
property that indicates whether the column is being filtered. Filter
接口具有On
属性,该属性指示是否正在过滤列。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.