Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeExcelDataModel

Module
PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument System.String[]

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

Syntax

Get-OfficeExcelDataModel
[-Document <ExcelDocument>]
[<CommonParameters>]
#
Parameter set: Document
Get-OfficeExcelDataModel
[-Path] <String[]>
[<CommonParameters>]
#
Parameter set: Path
Get-OfficeExcelDataModel
-LiteralPath <String[]>
[<CommonParameters>]
#
Parameter set: LiteralPath

Examples

Report data connections

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

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.