# Add-OfficeExcelThreadedComment

Adds a threaded comment or reply to an Excel worksheet.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: ExcelThreadedComment

**Module**

`PSWriteOffice`

**Aliases**

`ExcelThreadedComment`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Outputs**

`System.Management.Automation.PSObject`

**Source**

[AddOfficeExcelThreadedCommentCommand.cs:22](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/AddOfficeExcelThreadedCommentCommand.cs#L22) 

Adds a threaded comment or reply to an Excel worksheet.

## Syntax

```
Add-OfficeExcelThreadedComment
-Address <String>
[-Author <String>]
[-Date <DateTime>]
[-Done]
[-Id <String>]
[-ParentId <String>]
[-PassThru]
-Text <String>
[<CommonParameters>]
```

[#](#method-add-officeexcelthreadedcomment-string-string-datetime-switchparameter-string-string-switchparameter-string)

Parameter set: `Context`

```
Add-OfficeExcelThreadedComment
-Address <String>
[-Author <String>]
[-Date <DateTime>]
[-Done]
[-Id <String>]
[-NoSave]
[-ParentId <String>]
[-PassThru]
[-Path] <String>
[-Sheet <String>]
[-SheetIndex <Int32>]
-Text <String>
[<CommonParameters>]
```

[#](#method-add-officeexcelthreadedcomment-string-string-datetime-switchparameter-string-switchparameter-string-switchparameter-string-string-int32-string)

Parameter set: `Path`

```
Add-OfficeExcelThreadedComment
-Address <String>
[-Author <String>]
[-Date <DateTime>]
-Document <ExcelDocument>
[-Done]
[-Id <String>]
[-ParentId <String>]
[-PassThru]
[-Sheet <String>]
[-SheetIndex <Int32>]
-Text <String>
[<CommonParameters>]
```

[#](#method-add-officeexcelthreadedcomment-string-string-datetime-exceldocument-switchparameter-string-string-switchparameter-string-int32-string)

Parameter set: `Document`

## Examples

### Add a threaded review note and audit it before sharing.

```powershell
$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.

## Parameters

**-Address String required**

A1-style cell address, such as C5.

**-Author String optional**

Author display name stored in workbook person metadata.

**-Date DateTime optional**

Optional timestamp for the threaded comment.

**-Done SwitchParameter optional**

Mark the threaded comment as done/resolved.

**-Id String optional**

Optional stable threaded-comment id.

**-ParentId String optional**

Optional parent threaded-comment id when adding a reply.

**-PassThru SwitchParameter optional**

Emit threaded-comment metadata.

**-Text String required**

Threaded comment text.

**-NoSave SwitchParameter optionalsets: Path**

Do not save when operating on a path-owned workbook.

**-Path String requiredposition: 0aliases: FilePath, InputPathsets: Path**

Workbook path to update.

**-Sheet String optionalsets: Path, Document**

Worksheet name when using path or document input.

**-SheetIndex Int32 optionalsets: Path, Document**

Worksheet index (0-based) when using path or document input.

**-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document**

Workbook to operate on 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:693425C41C75AD66E003C5875D37E7801DB81559D7996C4AF4499A3A86E9FF67 -->
