# Set-OfficeExcelHyperlink

Sets a hyperlink on a worksheet cell. 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: ExcelHyperlink

**Module**

`PSWriteOffice`

**Aliases**

`ExcelHyperlink`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Source**

[SetOfficeExcelHyperlinkCommand.cs:23](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/SetOfficeExcelHyperlinkCommand.cs#L23) 

Sets a hyperlink on a worksheet cell.

## Syntax

```
Set-OfficeExcelHyperlink
[-Address <String>]
[-Column <Int32>]
[-Display <String>]
[-NoStyle]
[-PassThru]
[-Row <Int32>]
-Url <String>
[<CommonParameters>]
```

[#](#method-set-officeexcelhyperlink-string-int32-string-switchparameter-switchparameter-int32-string)

Parameter set: `ContextExternal`

```
Set-OfficeExcelHyperlink
[-Address <String>]
[-Column <Int32>]
[-Display <String>]
-Document <ExcelDocument>
[-NoStyle]
[-PassThru]
[-Row <Int32>]
[-Sheet <String>]
[-SheetIndex <Int32>]
-Url <String>
[<CommonParameters>]
```

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

Parameter set: `DocumentExternal`

```
Set-OfficeExcelHyperlink
[-Address <String>]
[-Column <Int32>]
[-Display <String>]
-Document <ExcelDocument>
[-Location <String>]
[-NoStyle]
[-PassThru]
[-Row <Int32>]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-TargetAddress <String>]
[-TargetSheet <String>]
[<CommonParameters>]
```

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

Parameter set: `DocumentInternal`

```
Set-OfficeExcelHyperlink
[-Address <String>]
[-Column <Int32>]
[-Display <String>]
[-Location <String>]
[-NoStyle]
[-PassThru]
[-Row <Int32>]
[-TargetAddress <String>]
[-TargetSheet <String>]
[<CommonParameters>]
```

[#](#method-set-officeexcelhyperlink-string-int32-string-string-switchparameter-switchparameter-int32-string-string)

Parameter set: `ContextInternal`

## Examples

### Set an external hyperlink.

```powershell
ExcelSheet 'Data' { Set-OfficeExcelHyperlink -Address 'A1' -Url 'https://example.org' -Display 'Example' }
```

Creates a styled hyperlink in A1.

### Set an internal hyperlink.

```powershell
ExcelSheet 'Data' { Set-OfficeExcelHyperlink -Row 2 -Column 1 -TargetSheet 'Summary' -TargetAddress 'A1' -Display 'Go to Summary' }
```

Links A2 to Summary!A1.

## Parameters

**-Address String optional**

A1-style cell address (e.g., A1, C5).

**-Column Int32 optional**

1-based column index.

**-Display String optional**

Optional display text.

**-NoStyle SwitchParameter optional**

Skip hyperlink styling (blue + underline).

**-PassThru SwitchParameter optional**

Emit the worksheet after setting the link.

**-Row Int32 optional**

1-based row index.

**-Url String requiredsets: ContextExternal, DocumentExternal**

External URL to link to.

**-Document ExcelDocument requiredpipeline: True (ByValue)sets: DocumentExternal, DocumentInternal**

Workbook to operate on outside the DSL context.

**-Sheet String optionalsets: DocumentExternal, DocumentInternal**

Worksheet name when using Document.

**-SheetIndex Int32 optionalsets: DocumentExternal, DocumentInternal**

Worksheet index (0-based) when using Document.

**-Location String optionalsets: DocumentInternal, ContextInternal**

Internal location to link to (e.g., "'Summary'!A1").

**-TargetAddress String optionalsets: DocumentInternal, ContextInternal**

Target A1 address for internal links.

**-TargetSheet String optionalsets: DocumentInternal, ContextInternal**

Target worksheet name for internal links.

## 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:56739139828507638520726476D8464F88EC4923AB5CA315C124DB76B8CC273C -->
