Cmdlet
Set-OfficeExcelHostHyperlink
Sets an external hyperlink that displays only the URL host.
Syntax
Set-OfficeExcelHostHyperlink
[-Address <String>]
[-Column <Int32>]
[-NoStyle]
[-PassThru]
[-Row <Int32>]
[-Url] <String>
[<CommonParameters>]#Parameter set:
ContextSet-OfficeExcelHostHyperlink
[-Address <String>]
[-Column <Int32>]
-Document <ExcelDocument>
[-NoStyle]
[-PassThru]
[-Row <Int32>]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-Url] <String>
[<CommonParameters>]#Parameter set:
DocumentExamples
Link to Microsoft Docs using host-only display text.
ExcelSheet 'Data' { Set-OfficeExcelHostHyperlink -Address 'B2' -Url 'https://learn.microsoft.com/office/open-xml/' }Creates a hyperlink that displays learn.microsoft.com.
Parameters
- -Address String
- A1-style cell address (e.g., A1, C5).
- -Column Int32
- 1-based column index.
- -NoStyle SwitchParameter
- Skip hyperlink styling (blue + underline).
- -PassThru SwitchParameter
- Emit the worksheet after setting the link.
- -Row Int32
- 1-based row index.
- -Url String
- External URL to link to.
- -Document ExcelDocument
- Workbook to operate on outside the DSL context.
- -Sheet String
- Worksheet name when using Document.
- -SheetIndex Int32
- 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.