# Set-OfficeExcelUrlLinksByHeader

Converts cells under a header into external URL hyperlinks.

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

**Module**

`PSWriteOffice`

**Aliases**

`ExcelUrlLinksByHeader`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Outputs**

`OfficeIMO.Excel.ExcelSheet`

**Source**

[SetOfficeExcelUrlLinksByHeaderCommand.cs:18](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/SetOfficeExcelUrlLinksByHeaderCommand.cs#L18) 

Converts cells under a header into external URL hyperlinks.

## Syntax

```
Set-OfficeExcelUrlLinksByHeader
[-Header] <String>
[-NoStyle]
[-PassThru]
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]
```

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

Parameter set: `ContextUsedRange`

```
Set-OfficeExcelUrlLinksByHeader
-Document <ExcelDocument>
[-Header] <String>
[-NoStyle]
[-PassThru]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]
```

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

Parameter set: `DocumentUsedRange`

```
Set-OfficeExcelUrlLinksByHeader
-Document <ExcelDocument>
[-Header] <String>
[-NoStyle]
[-PassThru]
[-Sheet <String>]
[-SheetIndex <Int32>]
-TableName <String>
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]
```

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

Parameter set: `DocumentTable`

```
Set-OfficeExcelUrlLinksByHeader
-Document <ExcelDocument>
[-Header] <String>
[-NoStyle]
[-PassThru]
-Range <String>
[-Sheet <String>]
[-SheetIndex <Int32>]
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]
```

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

Parameter set: `DocumentRange`

```
Set-OfficeExcelUrlLinksByHeader
[-Header] <String>
[-NoStyle]
[-PassThru]
-TableName <String>
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]
```

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

Parameter set: `ContextTable`

```
Set-OfficeExcelUrlLinksByHeader
[-Header] <String>
[-NoStyle]
[-PassThru]
-Range <String>
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]
```

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

Parameter set: `ContextRange`

## Examples

### Link the RFC column in a table.

```powershell
ExcelSheet 'Summary' { Set-OfficeExcelUrlLinksByHeader -Header 'RFC' -TableName 'Links' -UrlScript { param($text) "https://datatracker.ietf.org/doc/html/$text" } }
```

Uses the RFC column values to create external hyperlinks.

## Parameters

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

**-TitleScript ScriptBlock optional**

Optional mapping from cell text to display text.

**-UrlScript ScriptBlock required**

Maps the cell text to a URL.

**-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:1FDF183369A50BC22DC84D01BE1356461C6B40E419F0E10F3DC8A646186C3ECE -->
