Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeExcelSummary

Aliases: ExcelSummary
Module PSWriteOffice
Aliases
ExcelSummary
Inputs
OfficeIMO.Excel.ExcelDocument System.String
Outputs
System.Management.Automation.PSObject

Gets a compact structural summary of an Excel workbook.

Syntax

Get-OfficeExcelSummary [-IncludeSchema] [-IncludeSheets] [-Path] <String> [<CommonParameters>]
#
Parameter set: Path
Get-OfficeExcelSummary -Document <ExcelDocument> [-IncludeSchema] [-IncludeSheets] [<CommonParameters>]
#
Parameter set: Document

Examples

Authored help example

Summarize workbook contents before release.

$summary = Get-OfficeExcelSummary -Path .\report.xlsx -IncludeSheets
$summary |
    Select-Object -Property SheetCount, TableCount, ChartCount, PivotTableCount
$summary.Sheets |
    Select-Object -Property Name, State, UsedRange

Returns workbook-level counts plus per-sheet tables, charts, pivots, links, comments, and used ranges.

Parameters

-IncludeSchema SwitchParameter optional
Include OfficeIMO inspection snapshot details for schema discovery.
-IncludeSheets SwitchParameter optional
Include per-sheet details in the returned object.
-Path String requiredposition: 0pipeline: True (ByValue, ByPropertyName)aliases: FilePath, FullName, InputPath, LiteralPathsets: Path
Path to the workbook.
-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document
Workbook to inspect.

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.