File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ function Export-OpenXML {
2+ <#
3+ . SYNOPSIS
4+ Exports OpenXML
5+ . DESCRIPTION
6+ Exports loaded OpenXML to a file.
7+ #>
8+ [Alias (' Save-OpenXML' )]
9+ param (
10+ # The file path to save the turtle graphics pattern.
11+ [Parameter (Mandatory , ValueFromPipelineByPropertyName )]
12+ [Alias (' Path' )]
13+ [string ]
14+ $FilePath ,
15+
16+ # The input object.
17+ # This must be a package loaded with this module.
18+ [Parameter (ValueFromPipeline )]
19+ [PSObject ]
20+ $InputObject ,
21+
22+ # If set, will force the export even if a file already exists.
23+ [switch ]
24+ $Force
25+ )
26+
27+ process {
28+ # If there is no input return
29+ if (-not $InputObject ) { return }
30+ # If the input is not a package, pass it thru
31+ if ($InputObject -isnot [IO.Packaging.Package ]) {
32+ return $InputObject
33+ }
34+
35+ Copy-OpenXML - DestinationPath $FilePath - InputObject $inputObject - force:$Force
36+ }
37+ }
38+
You can’t perform that action at this time.
0 commit comments