# Get-OfficeExcelComment

Gets notes and threaded comments that match a filter.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Excel.ExcelDocument` `System.String[]`

**Source**

[GetOfficeExcelCommentCommand.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Excel/GetOfficeExcelCommentCommand.cs#L26) 

Gets notes and threaded comments that match a filter.

## Syntax

```
Get-OfficeExcelComment
[-Author <String>]
[-Document <ExcelDocument>]
[-Kind <All|Note|Threaded>]
[-Range <String>]
[-Sheet <OfficeSheetSelector[]>]
[-TextContains <String>]
[<CommonParameters>]
```

[#](#method-get-officeexcelcomment-string-exceldocument-excelcommentkind-string-officesheetselector-string)

Parameter set: `Document`

```
Get-OfficeExcelComment
[-Author <String>]
[-Kind <All|Note|Threaded>]
[-Path] <String[]>
[-Range <String>]
[-Sheet <OfficeSheetSelector[]>]
[-TextContains <String>]
[<CommonParameters>]
```

[#](#method-get-officeexcelcomment-string-excelcommentkind-string-string-officesheetselector-string)

Parameter set: `Path`

```
Get-OfficeExcelComment
[-Author <String>]
[-Kind <All|Note|Threaded>]
-LiteralPath <String[]>
[-Range <String>]
[-Sheet <OfficeSheetSelector[]>]
[-TextContains <String>]
[<CommonParameters>]
```

[#](#method-get-officeexcelcomment-string-excelcommentkind-string-string-officesheetselector-string-2)

Parameter set: `LiteralPath`

## Examples

### List all comments

```powershell
Get-OfficeExcelComment -Path .\Finance\Forecast-2027.xlsx
```

Shows every note and threaded comment in the workbook.

### Collect open review threads

```powershell
Get-OfficeExcelComment -Path .\Finance\Forecast-2027.xlsx -Kind Threaded -Author 'Anna Kowalska' |
                Export-OfficeExcel -Path .\Reviews\Forecast-Comments.xlsx -Title 'Open review comments'
```

Finds the threaded comments left by the finance reviewer and exports them as a review list.

## Parameters

**-Author String optional**

Comment author to match, ignoring case.

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

Caller-owned workbook; omission uses the enclosing Excel content block.

**-Kind ExcelCommentKind optional**

Metadata kind to add.

Possible values: `All`, `Note`, `Threaded`

**-Range String optional**

A1 cell range on the selected worksheet.

**-Sheet OfficeSheetSelector[] optionalaliases: WorksheetName**

Worksheet name, one-based position or native worksheet object. Multi-sheet commands also accept wildcard names.

**-TextContains String optional**

Text fragment to match, ignoring case.

**-Path String[] requiredposition: 0pipeline: True (ByValue)aliases: FilePathsets: Path**

Workbook paths resolved with filesystem wildcard support.

**-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath**

Literal workbook paths, including FileInfo.FullName and provider PSPath.

## 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).

<!-- PowerForge markdown artifact sha256:348F388B4E566F1525B5DCE7941CC59CF66C452A6EE684B668ADBF1DC3B74C63 -->
