# Remove-OfficeExcelNamedRange

Removes a workbook or sheet-scoped Excel named range.

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

**Module**

`PSWriteOffice`

**Aliases**

`ExcelNamedRangeRemove`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Outputs**

`System.Boolean`

**Source**

[RemoveOfficeExcelNamedRangeCommand.cs:20](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/RemoveOfficeExcelNamedRangeCommand.cs#L20) 

Removes a workbook or sheet-scoped Excel named range.

## Syntax

```
Remove-OfficeExcelNamedRange
[-Global]
[-Name] <String>
[-PassThru]
[-Save]
[<CommonParameters>]
```

[#](#method-remove-officeexcelnamedrange-switchparameter-string-switchparameter-switchparameter)

Parameter set: `Context`

```
Remove-OfficeExcelNamedRange
-Document <ExcelDocument>
[-Name] <String>
[-PassThru]
[-Save]
[-Sheet <String>]
[-SheetIndex <Int32>]
[<CommonParameters>]
```

[#](#method-remove-officeexcelnamedrange-exceldocument-string-switchparameter-switchparameter-string-int32)

Parameter set: `Document`

## Examples

### Remove a stale sheet-scoped named range from a workbook.

```powershell
$workbook = Get-OfficeExcel -Path .\Report.xlsx
$removed = $workbook | Remove-OfficeExcelNamedRange -Sheet Data -Name OldCriteria -PassThru
Save-OfficeExcel -Document $workbook
```

Uses the thin PowerShell surface over OfficeIMO named-range removal and saves the updated workbook.

## Parameters

**-Global SwitchParameter optionalsets: Context**

Use workbook-global scope from inside the DSL.

**-Name String requiredposition: 0**

Named range name.

**-PassThru SwitchParameter optional**

Emit a result object.

**-Save SwitchParameter optional**

Save the workbook immediately after removing the name.

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

Workbook document.

**-Sheet String optionalsets: Document**

Worksheet name for a sheet-scoped operation.

**-SheetIndex Int32 optionalsets: Document**

Zero-based worksheet index for a sheet-scoped operation.

## 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:1A19C491AA1F9386B2AFE513EA60C20C7BB13EEAE5DBF57D61A28C8C2F2178F9 -->
