Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

New-OfficeExcelSaveOptions

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Excel.ExcelSaveOptions

Creates native workbook save settings.

Syntax

New-OfficeExcelSaveOptions
[-ClearCachedFormulaResults]
[-EvaluateFormulas]
[-FullCalculationOnOpen]
[-MarkFormulasDirty]
[-NoFastPackageWriter]
[-Preflight]
[-RepairDefinedNames]
[-ValidateOpenXml]
[<CommonParameters>]
#
Parameter set: Default

Examples

Validate and recalculate a workbook on save.

$options = New-OfficeExcelSaveOptions -Preflight -EvaluateFormulas -FullCalculationOnOpen -ValidateOpenXml
Save-OfficeExcel -Document $workbook -SaveOptions $options

Parameters

-ClearCachedFormulaResults SwitchParameter optional
Remove cached formula results unless evaluation is requested.
-EvaluateFormulas SwitchParameter optional
Evaluate supported formulas and write their cached results.
-FullCalculationOnOpen SwitchParameter optional
Request a full recalculation when the workbook is opened.
-MarkFormulasDirty SwitchParameter optional
Mark formulas dirty for the next application open.
-NoFastPackageWriter SwitchParameter optional
Use the standard package finalization path.
-Preflight SwitchParameter optional
Run native worksheet preflight cleanup before saving.
-RepairDefinedNames SwitchParameter optional
Repair common defined-name issues before saving.
-ValidateOpenXml SwitchParameter optional
Validate the saved package against the Open XML schema.

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.