# Copy-OfficeExcelWorkbook

Copies a workbook package while preserving package parts.

Project

PSWriteOffice

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

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: ExcelPackageCopy, ExcelWorkbookCopy

**Module**

`PSWriteOffice`

**Aliases**

`ExcelPackageCopy` `ExcelWorkbookCopy`

**Inputs**

`None`

**Outputs**

`System.IO.FileInfo`

**Source**

[CopyOfficeExcelWorkbookCommand.cs:19](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/CopyOfficeExcelWorkbookCommand.cs#L19) 

Copies a workbook package while preserving package parts.

## Syntax

```
Copy-OfficeExcelWorkbook
[-DestinationPath] <String>
[-Force]
[-PassThru]
[-Path] <String>
[<CommonParameters>]
```

[#](#method-copy-officeexcelworkbook-string-switchparameter-switchparameter-string)

Parameter set: `All Parameter Sets`

## Examples

### Copy a workbook package and return the copied file.

```powershell
$copy = Copy-OfficeExcelWorkbook -Path .\Template.xlsx -DestinationPath .\Report.xlsx -Force -PassThru
Test-OfficeExcelWorkbook -Path $copy.FullName -SkipOpenXmlValidation |
    Select-Object Passed, WorksheetCount
```

Copies the workbook package and normalizes the workbook content type for the destination extension.

## Parameters

**-DestinationPath String requiredposition: 1aliases: Destination, OutputPath, TargetPath**

Destination workbook path.

**-Force SwitchParameter optional**

Replace an existing destination workbook.

**-PassThru SwitchParameter optional**

Emit a FileInfo for the copied workbook.

**-Path String requiredposition: 0aliases: FilePath, InputPath, SourcePath**

Source workbook or template package path.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:831E4149DEE49501EAFE984584A71715D3C660519F9CB4DBDD22D31FC8BF1067 -->
