Cmdlet
Save-OfficeExcel
Saves an Excel workbook without disposing it.
Syntax
Save-OfficeExcel
[-ClearCachedFormulaResults]
[-DateSystem <1900| 1904| NineteenHundred| NineteenFour>]
[-DisableFastPackageWriter]
[-Document] <ExcelDocument>
[-EvaluateFormulas]
[-ForceFullCalculationOnOpen]
[-MarkFormulasDirty]
[-Open]
[-PassThru]
[-Password <String>]
[-Path <String>]
[-SafePreflight]
[-SafeRepairDefinedNames]
[-ValidateOpenXml]
[<CommonParameters>]#Parameter set:
All Parameter SetsExamples
Save a workbook in-place.
$workbook | Save-OfficeExcelWrites pending changes to disk and keeps the workbook open.
Parameters
- -ClearCachedFormulaResults SwitchParameter
- Remove cached formula results before saving.
- -DateSystem String
- Workbook date system for Excel date serials.
- Possible values:
1900,1904,NineteenHundred,NineteenFour - -DisableFastPackageWriter SwitchParameter
- Disable OfficeIMO fast package writers for this save.
- -Document ExcelDocument
- Workbook to save.
- -EvaluateFormulas SwitchParameter
- Evaluate supported formulas and write cached values before saving.
- -ForceFullCalculationOnOpen SwitchParameter
- Request a full workbook recalculation when opened in Excel-compatible applications.
- -MarkFormulasDirty SwitchParameter
- Mark formula cells dirty before saving.
- -Open SwitchParameter
- Open the workbook after saving.
- -PassThru SwitchParameter
- Emit the workbook for further processing.
- -Password String
- Password used to save the workbook as an encrypted package.
- -Path String
- Optional save-as path.
- -SafePreflight SwitchParameter
- Run OfficeIMO worksheet preflight cleanup before saving.
- -SafeRepairDefinedNames SwitchParameter
- Repair common defined-name issues before saving.
- -ValidateOpenXml SwitchParameter
- Validate the saved package with OpenXmlValidator and throw on errors.
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.