Working with Powershell, and Excel, When you Filter a column and only want to (uncheck) one or two items from a column. So what i am looking for is this, the example below is if you are looking at an excel spreadsheet with filter turned on. click the drop down and uncheck one box. I want to be able to do this with a powershell script... I can already filter one or more items, via an array, however. if you add items to the excel column, you would also have to add them to the script so they will be chosen. So instead i want to (uncheck) one or more items. So if more are added , they will also be chosen, when the script is run...
COLUMN (D) Item1 = X Item2 = X Item3 = X Item4 = (This box will be unchecked) Item5 = X Item6 = (This box will be unchecked)# Filter for an array of values IE: choose muipliple items.... in one column $xlFilterValues = 7 # found in MS documentation #Create array for Items is column to be (unselected) $FL = @("Item4", "Item6") $rng=$Worksheet.cells.item(2,38).entirecolumn $rng.select | Out-Null #to make the array not equal to $Excel.Selection.AutoFilter(20,<>$FL,$xlFilterValues)
In other words, only to NOT choose Item4.. or -ne, which i have found does not work...
Jeffrey I Wilson