API Reference
Cmdlet
Get-OfficeExcelComment
Gets legacy worksheet comments (notes) from one or more worksheets.
Remarks
Gets legacy worksheet comments (notes) from one or more worksheets.
Examples
Find comments containing review text.
PS>
$comments = Get-OfficeExcelComment -Path .\Report.xlsx -Sheet Data -TextContains review
$comments |
Select-Object SheetName, Address, Author, Text
Returns matching comment metadata without modifying the workbook.
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-OfficeExcelComment [-Address <String>] [-Author <String>] [-Range <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-TextContains <String>] [<CommonParameters>]#Parameter set:
ContextParameters
- Address String
- A1 cell address to match.
- Author String
- Comment author to match, ignoring case.
- Range String
- A1 cell or range to match.
- Sheet String
- Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
- SheetIndex Nullable`1
- Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
- TextContains String
- Text fragment to match, ignoring case.
Outputs
System.Management.Automation.PSObject
Get-OfficeExcelComment [-Address <String>] [-Author <String>] -InputPath <String> [-Range <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-TextContains <String>] [<CommonParameters>]#Parameter set:
PathParameters
- Address String
- A1 cell address to match.
- Author String
- Comment author to match, ignoring case.
- InputPath String
- Workbook path to inspect.
- Range String
- A1 cell or range to match.
- Sheet String
- Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
- SheetIndex Nullable`1
- Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
- TextContains String
- Text fragment to match, ignoring case.
Outputs
System.Management.Automation.PSObject
Get-OfficeExcelComment [-Address <String>] [-Author <String>] -Document <ExcelDocument> [-Range <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-TextContains <String>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Address String
- A1 cell address to match.
- Author String
- Comment author to match, ignoring case.
- Document ExcelDocument
- Workbook to inspect outside the DSL context.
- Range String
- A1 cell or range to match.
- Sheet String
- Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
- SheetIndex Nullable`1
- Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
- TextContains String
- Text fragment to match, ignoring case.
Outputs
System.Management.Automation.PSObject