# Test-OfficeExcelWorkbook

Runs OfficeIMO workbook diagnostics and optional safe repairs.

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 **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

Aliases: ExcelDoctor, ExcelWorkbookDoctor

**Module**

`PSWriteOffice`

**Aliases**

`ExcelDoctor` `ExcelWorkbookDoctor`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Outputs**

`System.Management.Automation.PSObject`

**Source**

[TestOfficeExcelWorkbookCommand.cs:25](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/TestOfficeExcelWorkbookCommand.cs#L25) 

Runs OfficeIMO workbook diagnostics and optional safe repairs.

## Syntax

```
Test-OfficeExcelWorkbook
[-Path] <String>
[-Quiet]
[-RepairDefinedNames]
[-SkipOpenXmlValidation]
[<CommonParameters>]
```

[#](#method-test-officeexcelworkbook-string-switchparameter-switchparameter-switchparameter)

Parameter set: `Path`

```
Test-OfficeExcelWorkbook
-Document <ExcelDocument>
[-Quiet]
[-RepairDefinedNames]
[-SkipOpenXmlValidation]
[<CommonParameters>]
```

[#](#method-test-officeexcelworkbook-exceldocument-switchparameter-switchparameter-switchparameter)

Parameter set: `Document`

## Examples

### Gate a generated workbook before sending it to a user.

```powershell
$doctor = Test-OfficeExcelWorkbook -Path .\Report.xlsx -SkipOpenXmlValidation
if (-not $doctor.Passed) {
    $doctor.Issues |
        Sort-Object Severity,Category,SheetName,Address |
        Format-Table Severity,Category,SheetName,Address,Message,RepairAction
}
```

Returns OfficeIMO workbook diagnostics for defined names, formulas, tables, drawings, connections, and package validation.

## Parameters

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

Workbook path.

**-Quiet SwitchParameter optional**

Return only a Boolean pass/fail value.

**-RepairDefinedNames SwitchParameter optional**

Repair duplicate, invalid, or broken defined names before reporting.

**-SkipOpenXmlValidation SwitchParameter optional**

Skip Open XML validator checks.

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

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

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:19536CAD3D31176516C2A9F4AA83D90F7C886C61DB05DF743E44D00BC0AB2BE9 -->
