# Get-OfficeExcelDataModel

Reports connection, query-table, data-model and external-link parts in a workbook.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

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

**Source**

[GetOfficeExcelDataModelCommand.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Excel/GetOfficeExcelDataModelCommand.cs#L27) 

Reports connection, query-table, data-model and external-link parts in a workbook.

## Syntax

```
Get-OfficeExcelDataModel
[-Document <ExcelDocument>]
[<CommonParameters>]
```

[#](#method-get-officeexceldatamodel-exceldocument)

Parameter set: `Document`

```
Get-OfficeExcelDataModel
[-Path] <String[]>
[<CommonParameters>]
```

[#](#method-get-officeexceldatamodel-string)

Parameter set: `Path`

```
Get-OfficeExcelDataModel
-LiteralPath <String[]>
[<CommonParameters>]
```

[#](#method-get-officeexceldatamodel-string-2)

Parameter set: `LiteralPath`

## Examples

### Report data connections

```powershell
Get-OfficeExcelDataModel -Path .\Reports\Live-Sales.xlsx
```

Lists connections, query tables, data-model parts and external links in the workbook.

### Find workbooks with external data

```powershell
Get-ChildItem -Path \\files\Finance -Filter *.xlsx -Recurse |
                Get-OfficeExcelDataModel |
                Format-List
```

Reports the data model of every workbook on the finance share, to find files that depend on databases or other workbooks.

## Parameters

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

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

**-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:A170D8EC4485BF2CA8BA4F181B23818CAC4056CEF40CF86E68D65CA51F0A14D9 -->
