API Reference

Cmdlet

Get-OfficeExcelDataValidation

Aliases: ExcelDataValidation
Namespace PSWriteOffice
Aliases
ExcelDataValidation
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Management.Automation.PSObject

Gets data validation rules from one or more Excel worksheets.

Remarks

Gets data validation rules from one or more Excel worksheets.

Examples

Authored help example

Inspect validation rules in a workbook.

PS>


Get-OfficeExcelDataValidation -Path .\Report.xlsx -Sheet Data |
                Select-Object -Property SheetName, Range, Type, Operator, Formula1, Formula2
        

Returns validation metadata for workbook audits and maintenance workflows.

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

Get-OfficeExcelDataValidation [-HeaderName <String>] [-HeaderRow <Int32>] [-IncludeHeader] [-Range <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-TableName <String>] [<CommonParameters>]
#
Parameter set: Context

Parameters

HeaderName String optionalposition: namedpipeline: Falsealiases: ColumnName
Header or table column name used to resolve the range filter.
HeaderRow Int32 optionalposition: namedpipeline: False
Worksheet header row used when resolving HeaderName without a table. Use 0 for the first row of the used range.
IncludeHeader SwitchParameter optionalposition: namedpipeline: False
Include the header cell in the resolved range.
Range String optionalposition: namedpipeline: False
Optional A1 range filter.
Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
TableName String optionalposition: namedpipeline: False
Optional table name for header-based range resolution.

Outputs

System.Management.Automation.PSObject

Get-OfficeExcelDataValidation [-HeaderName <String>] [-HeaderRow <Int32>] [-IncludeHeader] -InputPath <String> [-Range <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-TableName <String>] [<CommonParameters>]
#
Parameter set: Path

Parameters

HeaderName String optionalposition: namedpipeline: Falsealiases: ColumnName
Header or table column name used to resolve the range filter.
HeaderRow Int32 optionalposition: namedpipeline: False
Worksheet header row used when resolving HeaderName without a table. Use 0 for the first row of the used range.
IncludeHeader SwitchParameter optionalposition: namedpipeline: False
Include the header cell in the resolved range.
InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Workbook path to inspect.
Range String optionalposition: namedpipeline: False
Optional A1 range filter.
Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
TableName String optionalposition: namedpipeline: False
Optional table name for header-based range resolution.

Outputs

System.Management.Automation.PSObject

Get-OfficeExcelDataValidation -Document <ExcelDocument> [-HeaderName <String>] [-HeaderRow <Int32>] [-IncludeHeader] [-Range <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-TableName <String>] [<CommonParameters>]
#
Parameter set: Document

Parameters

Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to inspect outside the DSL context.
HeaderName String optionalposition: namedpipeline: Falsealiases: ColumnName
Header or table column name used to resolve the range filter.
HeaderRow Int32 optionalposition: namedpipeline: False
Worksheet header row used when resolving HeaderName without a table. Use 0 for the first row of the used range.
IncludeHeader SwitchParameter optionalposition: namedpipeline: False
Include the header cell in the resolved range.
Range String optionalposition: namedpipeline: False
Optional A1 range filter.
Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
TableName String optionalposition: namedpipeline: False
Optional table name for header-based range resolution.

Outputs

System.Management.Automation.PSObject