# Set-OfficeExcelInternalLinksByHeader

Converts cells under a header 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 **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: ExcelInternalLinksByHeader

**Module**

`PSWriteOffice`

**Aliases**

`ExcelInternalLinksByHeader`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Outputs**

`OfficeIMO.Excel.ExcelSheet`

**Source**

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

Converts cells under a header into internal workbook links.

## Syntax

```
Set-OfficeExcelInternalLinksByHeader
[-DestinationSheetScript <ScriptBlock>]
[-DisplayScript <ScriptBlock>]
[-Header] <String>
[-NoStyle]
[-PassThru]
[-TargetAddress <String>]
[<CommonParameters>]
```

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

Parameter set: `ContextUsedRange`

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

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

Parameter set: `DocumentUsedRange`

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

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

Parameter set: `DocumentTable`

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

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

Parameter set: `DocumentRange`

```
Set-OfficeExcelInternalLinksByHeader
[-DestinationSheetScript <ScriptBlock>]
[-DisplayScript <ScriptBlock>]
[-Header] <String>
[-NoStyle]
[-PassThru]
-TableName <String>
[-TargetAddress <String>]
[<CommonParameters>]
```

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

Parameter set: `ContextTable`

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

[#](#method-set-officeexcelinternallinksbyheader-scriptblock-scriptblock-string-switchparameter-switchparameter-string-string-2)

Parameter set: `ContextRange`

## Examples

### Link the Sheet column in the used range.

```powershell
ExcelSheet 'Summary' { Set-OfficeExcelInternalLinksByHeader -Header 'Sheet' }
```

Uses the used range header row to find the Sheet column and converts its values into internal links.

## Parameters

**-DestinationSheetScript ScriptBlock optional**

Optional mapping from cell text to destination sheet name.

**-DisplayScript ScriptBlock optional**

Optional mapping from cell text to display text.

**-Header String requiredposition: 0**

Header text to locate.

**-NoStyle SwitchParameter optional**

Skip hyperlink styling (blue + underline).

**-PassThru SwitchParameter optional**

Emit the worksheet after creating links.

**-TargetAddress String optional**

Destination cell on the target sheet.

**-Document ExcelDocument requiredpipeline: True (ByValue)sets: DocumentUsedRange, DocumentTable, DocumentRange**

Workbook to operate on outside the DSL context.

**-Sheet String optionalsets: DocumentUsedRange, DocumentTable, DocumentRange**

Worksheet name when using Document.

**-SheetIndex Int32 optionalsets: DocumentUsedRange, DocumentTable, DocumentRange**

Worksheet index (0-based) when using Document.

**-TableName String requiredsets: DocumentTable, ContextTable**

Restrict linking to a named table.

**-Range String requiredsets: DocumentRange, ContextRange**

Restrict linking to a specific A1 range whose first row contains headers.

## 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:2D4B6AB541BAC870BEAFD05A77B13F05DC9CD3ADF2EC0A4D286D60D6B2A96480 -->
