Cmdlet
Get-OfficeExcelNamedRange
Gets defined names (named ranges) from an Excel workbook.
Syntax
Get-OfficeExcelNamedRange
[-Name <String>]
[-Path] <String>
[-Sheet <String>]
[-SheetIndex <Int32>]
[<CommonParameters>]#Parameter set:
PathGet-OfficeExcelNamedRange
[-AllowHttp]
[-Name <String>]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-Uri] <Uri>
[<CommonParameters>]#Parameter set:
UriGet-OfficeExcelNamedRange
-Document <ExcelDocument>
[-Name <String>]
[-Sheet <String>]
[-SheetIndex <Int32>]
[<CommonParameters>]#Parameter set:
DocumentExamples
List workbook and sheet-scoped names.
$ranges = Get-OfficeExcelNamedRange -Path .\report.xlsx
$ranges |
Select-Object -Property Name, Scope, Range |
Format-Table -AutoSizeReturns named ranges so workbook navigation and formulas can be reviewed.
Parameters
- -Name String
- Optional named range to retrieve.
- -Path String
- Path to the workbook.
- -Sheet String
- Optional sheet name for sheet-scoped names.
- -SheetIndex Int32
- Optional sheet index (0-based) for sheet-scoped names.
- -AllowHttp SwitchParameter
- Allow HTTP workbook downloads in addition to HTTPS.
- -Uri Uri
- Remote workbook URI to inspect.
- -Document ExcelDocument
- Workbook to inspect.
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.