API Reference

Cmdlet

Set-OfficeExcelAutoFilter

Aliases: ExcelAutoFilterSet
Namespace PSWriteOffice
Aliases
ExcelAutoFilterSet
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Object

Applies a friendly AutoFilter condition by header name.

Remarks

Applies a friendly AutoFilter condition by header name.

Examples

Authored help example

Filter a worksheet by header.

PS>


ExcelSheet 'Data' { Set-OfficeExcelAutoFilter -Range A1:D200 -Header Status -Value Open,Hold }
        

Ensures an AutoFilter range exists and filters the Status column.

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.

Syntax

Set-OfficeExcelAutoFilter [-Between <Double[]>] [-Contains <String>] [-DoesNotContain <String>] [-EndsWith <String>] [-GreaterThanOrEqual <Nullable`1>] -Header <String> [-LessThanOrEqual <Nullable`1>] [-NotBetween <Double[]>] [-NotEqual <Nullable`1>] [-PassThru] [-Range <String>] [-StartsWith <String>] [-Value <String[]>] [<CommonParameters>]
#
Parameter set: Context

Parameters

Between Double[] optionalposition: namedpipeline: False
Inclusive numeric range condition. Provide exactly two values: minimum, maximum.
Contains String optionalposition: namedpipeline: False
Text that the column value must contain.
DoesNotContain String optionalposition: namedpipeline: False
Text that the column value must not contain.
EndsWith String optionalposition: namedpipeline: False
Text that the column value must end with.
GreaterThanOrEqual Nullable`1 optionalposition: namedpipeline: False
Numeric greater-than-or-equal condition.
Header String requiredposition: 0pipeline: Falsealiases: ColumnName, HeaderName
Header name to filter.
LessThanOrEqual Nullable`1 optionalposition: namedpipeline: False
Numeric less-than-or-equal condition.
NotBetween Double[] optionalposition: namedpipeline: False
Outside numeric range condition. Provide exactly two values: minimum, maximum.
NotEqual Nullable`1 optionalposition: namedpipeline: False
Numeric not-equal condition.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the worksheet after applying the filter.
Range String optionalposition: namedpipeline: False
Optional A1 AutoFilter range to create or replace before applying the condition.
StartsWith String optionalposition: namedpipeline: False
Text that the column value must start with.
Value String[] optionalposition: namedpipeline: Falsealiases: Values
Allowed values for an equals filter.

Outputs

System.Object

Set-OfficeExcelAutoFilter [-Between <Double[]>] [-Contains <String>] -Document <ExcelDocument> [-DoesNotContain <String>] [-EndsWith <String>] [-GreaterThanOrEqual <Nullable`1>] -Header <String> [-LessThanOrEqual <Nullable`1>] [-NotBetween <Double[]>] [-NotEqual <Nullable`1>] [-PassThru] [-Range <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-StartsWith <String>] [-Value <String[]>] [<CommonParameters>]
#
Parameter set: Document

Parameters

Between Double[] optionalposition: namedpipeline: False
Inclusive numeric range condition. Provide exactly two values: minimum, maximum.
Contains String optionalposition: namedpipeline: False
Text that the column value must contain.
Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to operate on outside the DSL context.
DoesNotContain String optionalposition: namedpipeline: False
Text that the column value must not contain.
EndsWith String optionalposition: namedpipeline: False
Text that the column value must end with.
GreaterThanOrEqual Nullable`1 optionalposition: namedpipeline: False
Numeric greater-than-or-equal condition.
Header String requiredposition: 0pipeline: Falsealiases: ColumnName, HeaderName
Header name to filter.
LessThanOrEqual Nullable`1 optionalposition: namedpipeline: False
Numeric less-than-or-equal condition.
NotBetween Double[] optionalposition: namedpipeline: False
Outside numeric range condition. Provide exactly two values: minimum, maximum.
NotEqual Nullable`1 optionalposition: namedpipeline: False
Numeric not-equal condition.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the worksheet after applying the filter.
Range String optionalposition: namedpipeline: False
Optional A1 AutoFilter range to create or replace before applying the condition.
Sheet String optionalposition: namedpipeline: False
Worksheet name when using Document.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) when using Document.
StartsWith String optionalposition: namedpipeline: False
Text that the column value must start with.
Value String[] optionalposition: namedpipeline: Falsealiases: Values
Allowed values for an equals filter.

Outputs

System.Object