API Reference
Cmdlet
Add-OfficeExcelThreadedComment
Adds a threaded comment or reply to an Excel worksheet.
Remarks
Adds a threaded comment or reply to an Excel worksheet.
Examples
Add a threaded review note and audit it before sharing.
PS>
$comment = Add-OfficeExcelThreadedComment -Path .\Review.xlsx -Sheet Data -Address C5 -Text 'Please confirm this variance.' -Author 'Finance Reviewer' -PassThru
Add-OfficeExcelThreadedComment -Path .\Review.xlsx -Sheet Data -Address C5 -Text 'Confirmed with sales ops.' -Author 'Report Owner' -ParentId $comment.Id
Get-OfficeExcelCommentAudit -Path .\Review.xlsx -IncludeComments |
Select-Object -ExpandProperty ThreadedComments
Uses OfficeIMO threaded-comment metadata authoring, including workbook person metadata, and keeps legacy notes separate.
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
Add-OfficeExcelThreadedComment -Address <String> [-Author <String>] [-Date <Nullable`1>] [-Done] [-Id <String>] [-ParentId <String>] [-PassThru] -Text <String> [<CommonParameters>]#Parameter set:
ContextParameters
- Address String
- A1-style cell address, such as C5.
- Author String
- Author display name stored in workbook person metadata.
- Date Nullable`1
- Optional timestamp for the threaded comment.
- Done SwitchParameter
- Mark the threaded comment as done/resolved.
- Id String
- Optional stable threaded-comment id.
- ParentId String
- Optional parent threaded-comment id when adding a reply.
- PassThru SwitchParameter
- Emit threaded-comment metadata.
- Text String
- Threaded comment text.
Outputs
System.Management.Automation.PSObject
Add-OfficeExcelThreadedComment -Address <String> [-Author <String>] [-Date <Nullable`1>] [-Done] [-Id <String>] -InputPath <String> [-NoSave] [-ParentId <String>] [-PassThru] [-Sheet <String>] [-SheetIndex <Nullable`1>] -Text <String> [<CommonParameters>]#Parameter set:
PathParameters
- Address String
- A1-style cell address, such as C5.
- Author String
- Author display name stored in workbook person metadata.
- Date Nullable`1
- Optional timestamp for the threaded comment.
- Done SwitchParameter
- Mark the threaded comment as done/resolved.
- Id String
- Optional stable threaded-comment id.
- InputPath String
- Workbook path to update.
- NoSave SwitchParameter
- Do not save when operating on a path-owned workbook.
- ParentId String
- Optional parent threaded-comment id when adding a reply.
- PassThru SwitchParameter
- Emit threaded-comment metadata.
- Sheet String
- Worksheet name when using path or document input.
- SheetIndex Nullable`1
- Worksheet index (0-based) when using path or document input.
- Text String
- Threaded comment text.
Outputs
System.Management.Automation.PSObject
Add-OfficeExcelThreadedComment -Address <String> [-Author <String>] [-Date <Nullable`1>] -Document <ExcelDocument> [-Done] [-Id <String>] [-ParentId <String>] [-PassThru] [-Sheet <String>] [-SheetIndex <Nullable`1>] -Text <String> [<CommonParameters>]#Parameter set:
DocumentParameters
- Address String
- A1-style cell address, such as C5.
- Author String
- Author display name stored in workbook person metadata.
- Date Nullable`1
- Optional timestamp for the threaded comment.
- Document ExcelDocument
- Workbook to operate on outside the DSL context.
- Done SwitchParameter
- Mark the threaded comment as done/resolved.
- Id String
- Optional stable threaded-comment id.
- ParentId String
- Optional parent threaded-comment id when adding a reply.
- PassThru SwitchParameter
- Emit threaded-comment metadata.
- Sheet String
- Worksheet name when using path or document input.
- SheetIndex Nullable`1
- Worksheet index (0-based) when using path or document input.
- Text String
- Threaded comment text.
Outputs
System.Management.Automation.PSObject