LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to filter a excel spreadsheet column using Labview

Hi all,
 
As always those applications interfacing with Office will make me crazy.
Does anybody knows how to implement a filter in a Excel column ? I believe the way is using activeX, but  I don´t know witch properties I must set.
 
Thanks in advanced
Eduardo Alvarenga - Brazil
0 Kudos
Message 1 of 2
(4,100 Views)

You don't specify which version of Excel you are using, or what type of data you have.  Regardless, I recommend the AutoFilter Method which applies to a Range object.  Here are the parameters:

expression.AutoFilter(Field, Criteria1, Operator, Criteria2, VisibleDropDown)

expression    Required. An expression that returns one of the objects in the Applies To list.

Field    Optional Variant. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field one).

Criteria1    Optional Variant. The criteria (a string; for example, "101"). Use "=" to find blank fields, or use "<>" to find nonblank fields. If this argument is omitted, the criteria is All. If Operator is xlTop10Items, Criteria1 specifies the number of items (for example, "10").

Just wire a Range method which specifies any cell in the block into an AutoFilter method.  You can specify a string that contains the Criteria to filter by.
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 2 of 2
(4,092 Views)