Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeExcelCommentAudit

Aliases: ExcelCommentAudit, ExcelCommentsAudit
Module PSWriteOffice
Aliases
ExcelCommentAudit ExcelCommentsAudit
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Management.Automation.PSObject

Audits legacy notes and threaded comments preserved in an Excel workbook.

Syntax

Get-OfficeExcelCommentAudit [-IncludeComments] [-Path] <String> [<CommonParameters>]
#
Parameter set: Path
Get-OfficeExcelCommentAudit -Document <ExcelDocument> [-IncludeComments] [<CommonParameters>]
#
Parameter set: Document

Examples

Authored help example

Review comments before distributing a workbook.

$audit = Get-OfficeExcelCommentAudit -Path .\ReviewWorkbook.xlsx -IncludeComments
$audit.Comments | Sort-Object SheetName,CellReference | Format-Table SheetName,CellReference,Author,Text
$audit.Issues | Format-Table Severity,Category,SheetName,Address,Message

Returns workbook-level note/threaded-comment counts, optional comment records, and metadata issues such as missing authors or orphaned threaded replies.

Parameters

-IncludeComments SwitchParameter optional
Include legacy and threaded comment records in the output.
-Path String requiredposition: 0aliases: FilePath, InputPathsets: Path
Workbook path.
-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document
Workbook document.

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.