Cmdlet
Find-OfficeExcel
Finds text in worksheet values.
Syntax
Find-OfficeExcel
[-CaseSensitive]
[-Exact]
[-Path] <String>
[-Range <String>]
[-Regex]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-Text] <String>
[<CommonParameters>]#Parameter set:
PathFind-OfficeExcel
[-CaseSensitive]
-Document <ExcelDocument>
[-Exact]
[-Range <String>]
[-Regex]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-Text] <String>
[<CommonParameters>]#Parameter set:
DocumentExamples
Find status values and export their addresses.
$matches = Find-OfficeExcel -Path .\Report.xlsx -Text Ready -Sheet Summary
$matches |
Select-Object -Property Sheet, Address, Value |
Export-Csv -Path .\ReadyCells.csv -NoTypeInformationReturns matching cells with sheet, address, row, column, and value metadata for review or proof.
Parameters
- -CaseSensitive SwitchParameter
- Use case-sensitive matching.
- -Exact SwitchParameter
- Require an exact cell text match instead of substring matching.
- -Path 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 Int32
- Worksheet index when using a workbook object or path.
- -Text String
- Text or pattern to find.
- -Document ExcelDocument
- Workbook to inspect outside the DSL context.
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.