# Repair-OfficeExcelWorkbook

Runs OfficeIMO safe workbook repairs for common package, table, view, print, drawing, and calculation artifacts.

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: ExcelRepair, ExcelWorkbookRepair

**Module**

`PSWriteOffice`

**Aliases**

`ExcelRepair` `ExcelWorkbookRepair`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Outputs**

`System.Management.Automation.PSObject`

**Source**

[RepairOfficeExcelWorkbookCommand.cs:23](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/RepairOfficeExcelWorkbookCommand.cs#L23) 

Runs OfficeIMO safe workbook repairs for common package, table, view, print, drawing, and calculation artifacts.

## Syntax

```
Repair-OfficeExcelWorkbook
[-NoSave]
[-PassThru]
[-Path] <String>
[-SkipCalculation]
[-SkipDefinedNames]
[-SkipDrawings]
[-SkipPrintSettings]
[-SkipSheetViews]
[-SkipTables]
[<CommonParameters>]
```

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

Parameter set: `Path`

```
Repair-OfficeExcelWorkbook
-Document <ExcelDocument>
[-NoSave]
[-PassThru]
[-SkipCalculation]
[-SkipDefinedNames]
[-SkipDrawings]
[-SkipPrintSettings]
[-SkipSheetViews]
[-SkipTables]
[<CommonParameters>]
```

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

Parameter set: `Document`

## Examples

### Repair workbook package artifacts before handing the file to users.

```powershell
$repair = Repair-OfficeExcelWorkbook -Path .\QuarterlyReport.xlsx -PassThru
$repair.Actions | Format-Table Category,SheetName,Message
if ($repair.After.HasErrors) {
    $repair.After.Issues | Format-Table Severity,Category,SheetName,Address,Message
}
```

Uses the reusable OfficeIMO repair pipeline. The command normalizes safe workbook artifacts and returns before/after diagnostics when -PassThru is used.

## Parameters

**-NoSave SwitchParameter optional**

Do not save after applying repairs to an open document.

**-PassThru SwitchParameter optional**

Emit a repair report object.

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

Workbook path to repair.

**-SkipCalculation SwitchParameter optional**

Skip calculation-chain cleanup and recalc-on-open metadata.

**-SkipDefinedNames SwitchParameter optional**

Skip defined-name repairs.

**-SkipDrawings SwitchParameter optional**

Skip drawing, image, and header/footer picture repairs.

**-SkipPrintSettings SwitchParameter optional**

Skip print, page-break, and page-scale repairs.

**-SkipSheetViews SwitchParameter optional**

Skip worksheet view and freeze-pane repairs.

**-SkipTables SwitchParameter optional**

Skip worksheet table repairs.

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

Open workbook document to repair.

## 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:2E24186E1E2D0B0FA51DF08B3CE7ECFE7F27B86A740AFDA9BAD366BB160057B2 -->
