Cmdlet
New-OfficeExcelRepairOptions
Creates Excel repair settings for Repair-OfficeDocument.
Syntax
New-OfficeExcelRepairOptions
[-Area <ExcelRepairArea[]>]
[<CommonParameters>]#Parameter set:
DefaultExamples
Repair defined names and tables
Repair-OfficeDocument -Path .\Reports\Broken.xlsx -OutputPath .\Reports\Repaired.xlsx -Options (New-OfficeExcelRepairOptions -Area DefinedNames, Tables)Repairs only the defined names and tables of a damaged workbook and writes the result to a new file.
Repair print settings across a folder
$repair = New-OfficeExcelRepairOptions -Area SheetViews, PrintSettings
Get-ChildItem -Path \\files\Migrated -Filter *.xlsx |
Repair-OfficeDocument -Options $repair -PassThruFixes sheet views and print settings in every workbook of a migrated share, leaving formulas and drawings untouched.
Parameters
- -Area ExcelRepairArea[]
- Native workbook areas included in the operation; omitted selection uses the native default.
- Possible values:
DefinedNames,Tables,SheetViews,PrintSettings,Protection,AutoFilters,Drawings,LinksAndComments,Calculation,WorkbookArtifacts
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.