OfficeIMO

API Reference

Command

Get-OfficeExcelNamedRange

Namespace PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Management.Automation.PSObject

Gets defined names (named ranges) from an Excel workbook.

Remarks

Gets defined names (named ranges) from an Excel workbook.

Examples

List named ranges.


PS>Get-OfficeExcelNamedRange -Path .\report.xlsx
        

Returns workbook-level named ranges.

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

Get-OfficeExcelNamedRange -InputPath <String> [-Name <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]
#
Parameter set: Path

Parameters

InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Path to the workbook.
Name String optionalposition: namedpipeline: False
Optional named range to retrieve.
Sheet String optionalposition: namedpipeline: False
Optional sheet name for sheet-scoped names.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Optional sheet index (0-based) for sheet-scoped names.

Outputs

System.Management.Automation.PSObject

Get-OfficeExcelNamedRange -Document <ExcelDocument> [-Name <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [<CommonParameters>]
#
Parameter set: Document

Parameters

Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to inspect.
Name String optionalposition: namedpipeline: False
Optional named range to retrieve.
Sheet String optionalposition: namedpipeline: False
Optional sheet name for sheet-scoped names.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Optional sheet index (0-based) for sheet-scoped names.

Outputs

System.Management.Automation.PSObject