# Get-OfficeExcelPivotTable

Gets pivot tables defined in a workbook. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

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: ExcelPivotTables

**Module**

`PSWriteOffice`

**Aliases**

`ExcelPivotTables`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Outputs**

`System.Management.Automation.PSObject`

**Source**

[GetOfficeExcelPivotTableCommand.cs:24](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/GetOfficeExcelPivotTableCommand.cs#L24) 

Gets pivot tables defined in a workbook.

## Syntax

```
Get-OfficeExcelPivotTable
[-Name <String>]
[-Path] <String>
[-Sheet <String>]
[-SheetIndex <Int32>]
[<CommonParameters>]
```

[#](#method-get-officeexcelpivottable-string-string-string-int32)

Parameter set: `Path`

```
Get-OfficeExcelPivotTable
-Document <ExcelDocument>
[-Name <String>]
[-Sheet <String>]
[-SheetIndex <Int32>]
[<CommonParameters>]
```

[#](#method-get-officeexcelpivottable-exceldocument-string-string-int32)

Parameter set: `Document`

## Examples

### Read pivot table metadata from a workbook.

```powershell
$pivots = Get-OfficeExcelPivotTable -Path .\report.xlsx -Sheet Summary
$pivots |
    Select-Object -Property Name, Sheet, SourceRange, RowFields, DataFields |
    Format-List
```

Returns pivot table metadata so generated reports can prove the pivot source and layout.

## Parameters

**-Name String optional**

Optional pivot table name filter.

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

Path to the workbook.

**-Sheet String optional**

Optional sheet name filter.

**-SheetIndex Int32 optional**

Optional sheet index (0-based) filter.

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

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:066B486D5BBA536B0498A9EAEE2410912C4495E9E0F80E828B9E795E116A47DB -->
