API Reference
Cmdlet
Find-OfficeExcel
Finds text in worksheet values.
Remarks
Finds text in worksheet values.
Examples
Find status values and export their addresses.
PS>
$matches = Find-OfficeExcel -Path .\Report.xlsx -Text Ready -Sheet Summary
$matches |
Select-Object -Property Sheet, Address, Value |
Export-Csv -Path .\ReadyCells.csv -NoTypeInformation
Returns matching cells with sheet, address, row, column, and value metadata for review or proof.
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
Find-OfficeExcel [-CaseSensitive] [-Exact] -InputPath <String> [-Range <String>] [-Regex] [-Sheet <String>] [-SheetIndex <Nullable`1>] -Text <String> [<CommonParameters>]#Parameter set:
PathParameters
- CaseSensitive SwitchParameter
- Use case-sensitive matching.
- Exact SwitchParameter
- Require an exact cell text match instead of substring matching.
- InputPath String
- Workbook path to inspect.
- Range String
- A1 range to search. Defaults to each selected worksheet's used range.
- Regex SwitchParameter
- Treat -Text as a regular expression.
- Sheet String
- Worksheet name. Defaults to all sheets for path/document use and current sheet inside an ExcelSheet block.
- SheetIndex Nullable`1
- Worksheet index when using a workbook object or path.
- Text String
- Text or pattern to find.
Outputs
System.Management.Automation.PSObject
Find-OfficeExcel [-CaseSensitive] -Document <ExcelDocument> [-Exact] [-Range <String>] [-Regex] [-Sheet <String>] [-SheetIndex <Nullable`1>] -Text <String> [<CommonParameters>]#Parameter set:
DocumentParameters
- CaseSensitive SwitchParameter
- Use case-sensitive matching.
- Document ExcelDocument
- Workbook to inspect outside the DSL context.
- Exact SwitchParameter
- Require an exact cell text match instead of substring matching.
- Range String
- A1 range to search. Defaults to each selected worksheet's used range.
- Regex SwitchParameter
- Treat -Text as a regular expression.
- Sheet String
- Worksheet name. Defaults to all sheets for path/document use and current sheet inside an ExcelSheet block.
- SheetIndex Nullable`1
- Worksheet index when using a workbook object or path.
- Text String
- Text or pattern to find.
Outputs
System.Management.Automation.PSObject