| external help file | PSWriteOffice-help.xml |
|---|---|
| Module Name | PSWriteOffice |
| online version | https://github.com/EvotecIT/PSWriteOffice |
| schema | 2.0.0 |
Closes an Excel workbook and optionally saves it.
Close-OfficeExcel -Document <ExcelDocument> [-Save] [-Path <string>] [-Show] [<CommonParameters>]Closes an Excel workbook and optionally saves it.
PS>Close-OfficeExcel -Document $workbook -Save -Path .\report-final.xlsx -ShowSaves pending changes to a new file, launches Excel, and releases the workbook.
Workbook to close.
Type: ExcelDocument
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:
Required: True
Position: named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: TrueOptional output path when saving.
Type: String
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TruePersist changes before closing.
Type: SwitchParameter
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueOpen the workbook in Excel after saving.
Type: SwitchParameter
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
OfficeIMO.Excel.ExcelDocument
System.Object
- None