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