API Reference
Command
Set-OfficeExcelUrlLinksByHeader
Converts cells under a header into external URL hyperlinks.
Remarks
Converts cells under a header into external URL hyperlinks.
Examples
Link the RFC column in a table.
PS>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.
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-OfficeExcelUrlLinksByHeader -Header <String> [-NoStyle] [-PassThru] [-TitleScript <ScriptBlock>] -UrlScript <ScriptBlock> [<CommonParameters>]#Parameter set:
ContextUsedRangeParameters
- 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.
Outputs
OfficeIMO.Excel.ExcelSheet
Set-OfficeExcelUrlLinksByHeader -Document <ExcelDocument> -Header <String> [-NoStyle] [-PassThru] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-TitleScript <ScriptBlock>] -UrlScript <ScriptBlock> [<CommonParameters>]#Parameter set:
DocumentUsedRangeParameters
- Document ExcelDocument
- Workbook to operate on outside the DSL context.
- Header String
- Header text to locate.
- NoStyle SwitchParameter
- Skip hyperlink styling (blue + underline).
- PassThru SwitchParameter
- Emit the worksheet after creating links.
- Sheet String
- Worksheet name when using Document.
- SheetIndex Nullable`1
- Worksheet index (0-based) when using Document.
- TitleScript ScriptBlock
- Optional mapping from cell text to display text.
- UrlScript ScriptBlock
- Maps the cell text to a URL.
Outputs
OfficeIMO.Excel.ExcelSheet
Set-OfficeExcelUrlLinksByHeader -Document <ExcelDocument> -Header <String> [-NoStyle] [-PassThru] [-Sheet <String>] [-SheetIndex <Nullable`1>] -TableName <String> [-TitleScript <ScriptBlock>] -UrlScript <ScriptBlock> [<CommonParameters>]#Parameter set:
DocumentTableParameters
- Document ExcelDocument
- Workbook to operate on outside the DSL context.
- Header String
- Header text to locate.
- NoStyle SwitchParameter
- Skip hyperlink styling (blue + underline).
- PassThru SwitchParameter
- Emit the worksheet after creating links.
- Sheet String
- Worksheet name when using Document.
- SheetIndex Nullable`1
- Worksheet index (0-based) when using Document.
- TableName String
- Restrict linking to a named table.
- TitleScript ScriptBlock
- Optional mapping from cell text to display text.
- UrlScript ScriptBlock
- Maps the cell text to a URL.
Outputs
OfficeIMO.Excel.ExcelSheet
Set-OfficeExcelUrlLinksByHeader -Document <ExcelDocument> -Header <String> [-NoStyle] [-PassThru] -Range <String> [-Sheet <String>] [-SheetIndex <Nullable`1>] [-TitleScript <ScriptBlock>] -UrlScript <ScriptBlock> [<CommonParameters>]#Parameter set:
DocumentRangeParameters
- Document ExcelDocument
- Workbook to operate on outside the DSL context.
- Header String
- Header text to locate.
- NoStyle SwitchParameter
- Skip hyperlink styling (blue + underline).
- PassThru SwitchParameter
- Emit the worksheet after creating links.
- Range String
- Restrict linking to a specific A1 range whose first row contains headers.
- Sheet String
- Worksheet name when using Document.
- SheetIndex Nullable`1
- Worksheet index (0-based) when using Document.
- TitleScript ScriptBlock
- Optional mapping from cell text to display text.
- UrlScript ScriptBlock
- Maps the cell text to a URL.
Outputs
OfficeIMO.Excel.ExcelSheet
Set-OfficeExcelUrlLinksByHeader -Header <String> [-NoStyle] [-PassThru] -TableName <String> [-TitleScript <ScriptBlock>] -UrlScript <ScriptBlock> [<CommonParameters>]#Parameter set:
ContextTableParameters
- Header String
- Header text to locate.
- NoStyle SwitchParameter
- Skip hyperlink styling (blue + underline).
- PassThru SwitchParameter
- Emit the worksheet after creating links.
- TableName String
- Restrict linking to a named table.
- TitleScript ScriptBlock
- Optional mapping from cell text to display text.
- UrlScript ScriptBlock
- Maps the cell text to a URL.
Outputs
OfficeIMO.Excel.ExcelSheet
Set-OfficeExcelUrlLinksByHeader -Header <String> [-NoStyle] [-PassThru] -Range <String> [-TitleScript <ScriptBlock>] -UrlScript <ScriptBlock> [<CommonParameters>]#Parameter set:
ContextRangeParameters
- Header String
- Header text to locate.
- NoStyle SwitchParameter
- Skip hyperlink styling (blue + underline).
- PassThru SwitchParameter
- Emit the worksheet after creating links.
- Range String
- Restrict linking to a specific A1 range whose first row contains headers.
- TitleScript ScriptBlock
- Optional mapping from cell text to display text.
- UrlScript ScriptBlock
- Maps the cell text to a URL.
Outputs
OfficeIMO.Excel.ExcelSheet