# Set-OfficeExcelInternalLinks

Converts cells in a range into internal workbook links.

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 **722**

Forks **84**

Open issues **2**

Total downloads **5,205,291**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-22

Cmdlet 

Aliases: ExcelInternalLinks

**Module**

`PSWriteOffice`

**Aliases**

`ExcelInternalLinks`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Outputs**

`OfficeIMO.Excel.ExcelSheet`

**Source**

[SetOfficeExcelInternalLinksCommand.cs:17](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/SetOfficeExcelInternalLinksCommand.cs#L17) 

Converts cells in a range into internal workbook links.

## Syntax

```
Set-OfficeExcelInternalLinks
[-DestinationSheetScript <ScriptBlock>]
[-DisplayScript <ScriptBlock>]
[-NoStyle]
[-PassThru]
[-Range] <String>
[-TargetAddress <String>]
[<CommonParameters>]
```

[#](#method-set-officeexcelinternallinks-scriptblock-scriptblock-switchparameter-switchparameter-string-string)

Parameter set: `Context`

```
Set-OfficeExcelInternalLinks
[-DestinationSheetScript <ScriptBlock>]
[-DisplayScript <ScriptBlock>]
-Document <ExcelDocument>
[-NoStyle]
[-PassThru]
[-Range] <String>
[-Sheet <String>]
[-SheetIndex <Int32>]
[-TargetAddress <String>]
[<CommonParameters>]
```

[#](#method-set-officeexcelinternallinks-scriptblock-scriptblock-exceldocument-switchparameter-switchparameter-string-string-int32-string)

Parameter set: `Document`

## Examples

### Link a summary range to same-named sheets.

```powershell
ExcelSheet 'Summary' { Set-OfficeExcelInternalLinks -Range 'A2:A10' }
```

Turns each non-empty cell in A2:A10 into an internal link to the sheet with the same name.

## Parameters

**-DestinationSheetScript ScriptBlock optional**

Optional mapping from cell text to destination sheet name.

**-DisplayScript ScriptBlock optional**

Optional mapping from cell text to display text.

**-NoStyle SwitchParameter optional**

Skip hyperlink styling (blue + underline).

**-PassThru SwitchParameter optional**

Emit the worksheet after creating links.

**-Range String requiredposition: 0**

A1 range containing values to convert into internal links.

**-TargetAddress String optional**

Destination cell on the target sheet.

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

Workbook to operate on outside the DSL context.

**-Sheet String optionalsets: Document**

Worksheet name when using Document.

**-SheetIndex Int32 optionalsets: Document**

Worksheet index (0-based) when using Document.

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