Skip to content

Latest commit

 

History

History
109 lines (83 loc) · 2.1 KB

File metadata and controls

109 lines (83 loc) · 2.1 KB
external help file PSWriteOffice-help.xml
Module Name PSWriteOffice
online version https://github.com/EvotecIT/PSWriteOffice
schema 2.0.0

Close-OfficeExcel

SYNOPSIS

Closes an Excel workbook and optionally saves it.

SYNTAX

__AllParameterSets

Close-OfficeExcel -Document <ExcelDocument> [-Save] [-Path <string>] [-Show] [<CommonParameters>]

DESCRIPTION

Closes an Excel workbook and optionally saves it.

EXAMPLES

EXAMPLE 1

PS>Close-OfficeExcel -Document $workbook -Save -Path .\report-final.xlsx -Show

Saves pending changes to a new file, launches Excel, and releases the workbook.

PARAMETERS

-Document

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: True

-Path

Optional 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: True

-Save

Persist 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: True

-Show

Open 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: True

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

  • OfficeIMO.Excel.ExcelDocument

OUTPUTS

  • System.Object

RELATED LINKS

  • None