Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Save-OfficeExcel

Module
PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
OfficeIMO.Excel.ExcelDocument

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 Sets

Examples

Save a workbook in-place.

$workbook | Save-OfficeExcel

Writes pending changes to disk and keeps the workbook open.

Parameters

-ClearCachedFormulaResults SwitchParameter optional
Remove cached formula results before saving.
-DateSystem String optional
Workbook date system for Excel date serials.
Possible values: 1900, 1904, NineteenHundred, NineteenFour
-DisableFastPackageWriter SwitchParameter optional
Disable OfficeIMO fast package writers for this save.
-Document ExcelDocument requiredposition: 0pipeline: True (ByValue)
Workbook to save.
-EvaluateFormulas SwitchParameter optional
Evaluate supported formulas and write cached values before saving.
-ForceFullCalculationOnOpen SwitchParameter optional
Request a full workbook recalculation when opened in Excel-compatible applications.
-MarkFormulasDirty SwitchParameter optional
Mark formula cells dirty before saving.
-Open SwitchParameter optionalaliases: Show
Open the workbook after saving.
-PassThru SwitchParameter optional
Emit the workbook for further processing.
-Password String optional
Password used to save the workbook as an encrypted package.
-Path String optional
Optional save-as path.
-SafePreflight SwitchParameter optional
Run OfficeIMO worksheet preflight cleanup before saving.
-SafeRepairDefinedNames SwitchParameter optional
Repair common defined-name issues before saving.
-ValidateOpenXml SwitchParameter optional
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.