# Move-OfficeExcelSheet

Moves a worksheet to a new workbook position. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

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: ExcelSheetOrder, Set-OfficeExcelSheetOrder

**Module**

`PSWriteOffice`

**Aliases**

`ExcelSheetOrder` `Set-OfficeExcelSheetOrder`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Source**

[MoveOfficeExcelSheetCommand.cs:22](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/MoveOfficeExcelSheetCommand.cs#L22) 

Moves a worksheet to a new workbook position.

## Syntax

```
Move-OfficeExcelSheet
-Index <Int32>
[-PassThru]
[-Sheet <String>]
[-SheetIndex <Int32>]
[<CommonParameters>]
```

[#](#method-move-officeexcelsheet-int32-switchparameter-string-int32)

Parameter set: `Context`

```
Move-OfficeExcelSheet
-Index <Int32>
[-PassThru]
[-Path] <String>
[-Sheet <String>]
[-SheetIndex <Int32>]
[<CommonParameters>]
```

[#](#method-move-officeexcelsheet-int32-switchparameter-string-string-int32)

Parameter set: `Path`

```
Move-OfficeExcelSheet
-Document <ExcelDocument>
-Index <Int32>
[-PassThru]
[-Sheet <String>]
[-SheetIndex <Int32>]
[<CommonParameters>]
```

[#](#method-move-officeexcelsheet-exceldocument-int32-switchparameter-string-int32)

Parameter set: `Document`

## Examples

### Move the summary sheet to the front and verify order.

```powershell
$proof = @(
    Move-OfficeExcelSheet -Path .\Report.xlsx -Sheet Summary -Index 0
    Get-OfficeExcelSummary -Path .\Report.xlsx -IncludeSheets |
        Select-Object -ExpandProperty Sheets |
        Select-Object -First 3 -Property Index, Name
)
$proof
```

Moves Summary to the first worksheet tab and reads back the first sheets from workbook summary.

## Parameters

**-Index Int32 requiredaliases: TargetIndex**

Zero-based destination tab index.

**-PassThru SwitchParameter optional**

Emit the moved worksheet.

**-Sheet String optionalaliases: WorksheetName**

Worksheet name to move. Defaults to the current sheet inside an ExcelSheet block.

**-SheetIndex Int32 optional**

Worksheet index to move when using a workbook object or path.

**-Path String requiredposition: 0aliases: FilePath, InputPathsets: Path**

Workbook path to update.

**-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document**

Workbook to update outside the DSL context.

## 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:CD585016E613FE339DF2C6CB019192A2CB0A554301C312E7B90DAAD17F8A61BA -->
