Project

PSWriteOffice

PSWriteOffice is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars158
Forks14
Open issues0
PowerShell Gallery downloads158661
Releasev3.0.5
Language: C# Updated: 2026-08-20T06:15:04.0000000+00:00

Documentation

Validate and Repair Excel Workbooks

Preflight workbook operations, test integrity and accessibility, diagnose package state, and apply deliberate repairs.

Validation is a delivery stage, not an incidental side effect of opening a workbook. Keep inspection separate from repair so an automation run cannot silently rewrite a source file.

Preflight first

  • Get-OfficeExcelRuntimePreflight reports runtime capabilities and warnings.
  • Get-OfficeExcelPreflight reports workbook-specific readiness and repair hints.
  • Test-OfficeExcelWorkbook checks workbook integrity.
  • Test-OfficeExcelAccessibility checks accessible-delivery concerns.
  • Get-OfficeExcelSummary -IncludeSchema inventories package features such as queries, slicers, timelines, and external structures.

Repair explicitly

Use Repair-OfficeExcelWorkbook only after inspecting the proposed repair class and preserving the original when required. Reopen the result, repeat the integrity checks, and compare it with the source if preservation matters.

For automated delivery, a useful gate is: create or update, save, preflight, test integrity, test accessibility when applicable, compare against a reference contract, then publish. The operational dashboard provides a substantial artifact for exercising that path.