Cmdlet
Set-OfficeExcelAutoFilter
Applies a friendly AutoFilter condition by header name.
Syntax
Set-OfficeExcelAutoFilter [-Between <Double[]>] [-Contains <String>] [-DoesNotContain <String>] [-EndsWith <String>] [-GreaterThanOrEqual <Double>] [-Header] <String> [-LessThanOrEqual <Double>] [-NotBetween <Double[]>] [-NotEqual <Double>] [-PassThru] [-Range <String>] [-StartsWith <String>] [-Value <String[]>] [<CommonParameters>]#Parameter set:
ContextSet-OfficeExcelAutoFilter [-Between <Double[]>] [-Contains <String>] -Document <ExcelDocument> [-DoesNotContain <String>] [-EndsWith <String>] [-GreaterThanOrEqual <Double>] [-Header] <String> [-LessThanOrEqual <Double>] [-NotBetween <Double[]>] [-NotEqual <Double>] [-PassThru] [-Range <String>] [-Sheet <String>] [-SheetIndex <Int32>] [-StartsWith <String>] [-Value <String[]>] [<CommonParameters>]#Parameter set:
DocumentExamples
Filter a worksheet by header.
ExcelSheet 'Data' { Set-OfficeExcelAutoFilter -Range A1:D200 -Header Status -Value Open,Hold }Ensures an AutoFilter range exists and filters the Status column.
Parameters
- -Between Double[]
- Inclusive numeric range condition. Provide exactly two values: minimum, maximum.
- -Contains String
- Text that the column value must contain.
- -DoesNotContain String
- Text that the column value must not contain.
- -EndsWith String
- Text that the column value must end with.
- -GreaterThanOrEqual Double
- Numeric greater-than-or-equal condition.
- -Header String
- Header name to filter.
- -LessThanOrEqual Double
- Numeric less-than-or-equal condition.
- -NotBetween Double[]
- Outside numeric range condition. Provide exactly two values: minimum, maximum.
- -NotEqual Double
- Numeric not-equal condition.
- -PassThru SwitchParameter
- Emit the worksheet after applying the filter.
- -Range String
- Optional A1 AutoFilter range to create or replace before applying the condition.
- -StartsWith String
- Text that the column value must start with.
- -Value String[]
- Allowed values for an equals filter.
- -Document ExcelDocument
- Workbook to operate on outside the DSL context.
- -Sheet String
- Worksheet name when using Document.
- -SheetIndex Int32
- Worksheet index (0-based) when using Document.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.