Cmdlet
Set-OfficeExcelUrlLinksByHeader
Converts cells under a header into external URL hyperlinks.
Syntax
Set-OfficeExcelUrlLinksByHeader
[-Header] <String>
[-NoStyle]
[-PassThru]
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]#Parameter set:
ContextUsedRangeSet-OfficeExcelUrlLinksByHeader
-Document <ExcelDocument>
[-Header] <String>
[-NoStyle]
[-PassThru]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]#Parameter set:
DocumentUsedRangeSet-OfficeExcelUrlLinksByHeader
-Document <ExcelDocument>
[-Header] <String>
[-NoStyle]
[-PassThru]
[-Sheet <String>]
[-SheetIndex <Int32>]
-TableName <String>
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]#Parameter set:
DocumentTableSet-OfficeExcelUrlLinksByHeader
-Document <ExcelDocument>
[-Header] <String>
[-NoStyle]
[-PassThru]
-Range <String>
[-Sheet <String>]
[-SheetIndex <Int32>]
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]#Parameter set:
DocumentRangeSet-OfficeExcelUrlLinksByHeader
[-Header] <String>
[-NoStyle]
[-PassThru]
-TableName <String>
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]#Parameter set:
ContextTableSet-OfficeExcelUrlLinksByHeader
[-Header] <String>
[-NoStyle]
[-PassThru]
-Range <String>
[-TitleScript <ScriptBlock>]
-UrlScript <ScriptBlock>
[<CommonParameters>]#Parameter set:
ContextRangeExamples
Link the RFC column in a table.
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
- Header text to locate.
- -NoStyle SwitchParameter
- Skip hyperlink styling (blue + underline).
- -PassThru SwitchParameter
- Emit the worksheet after creating links.
- -TitleScript ScriptBlock
- Optional mapping from cell text to display text.
- -UrlScript ScriptBlock
- Maps the cell text to a URL.
- -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.
- -TableName String
- Restrict linking to a named table.
- -Range String
- 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.