Cmdlet
Get-OfficeExcelDataModel
Inspects workbook data model, query, connection, and external-link package parts.
Syntax
Examples
Detect query/model metadata that OfficeIMO preserves but does not execute.
$model = Get-OfficeExcelDataModel -Path .\WorkbookWithQueries.xlsx
if ($model.HasDataModelOrQueries) {
$model.Details | ForEach-Object { "Preserved package part: $_" }
}Separates preserved connection/query/data-model parts from executable refresh behavior so automation can decide whether Excel refresh is required.
Parameters
- -Path String
- Workbook path.
- -Document ExcelDocument
- 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.