Cmdlet
Get-OfficeExcelTable
Lists the tables defined in a workbook.
Syntax
Get-OfficeExcelTable
[-Document <ExcelDocument>]
[-Name <String>]
[-Sheet <OfficeSheetSelector>]
[<CommonParameters>]#Parameter set:
DocumentGet-OfficeExcelTable
[-Name <String>]
[-Path] <String[]>
[-Sheet <OfficeSheetSelector>]
[<CommonParameters>]#Parameter set:
PathGet-OfficeExcelTable
-LiteralPath <String[]>
[-Name <String>]
[-Sheet <OfficeSheetSelector>]
[<CommonParameters>]#Parameter set:
LiteralPathGet-OfficeExcelTable
[-AllowHttp]
[-Name <String>]
[-Sheet <OfficeSheetSelector>]
[-Uri] <Uri>
[<CommonParameters>]#Parameter set:
UriExamples
List the tables in a workbook
Get-OfficeExcelTable -Path .\Reports\Q3-Sales.xlsxShows every table with its sheet, range and style.
Inventory the tables across report files
Get-ChildItem -Path .\Reports -Filter *.xlsx |
Get-OfficeExcelTable |
Select-Object SheetName, Name, Range, StyleNameLists the tables of every workbook in the Reports folder with where they live, to plan which ones a dashboard should read.
Parameters
- -Document ExcelDocument
- Caller-owned workbook; omission uses the enclosing Excel content block.
- -Name String
- Optional table name filter.
- -Sheet OfficeSheetSelector
- Worksheet name, one-based position or native worksheet object. Multi-sheet commands also accept wildcard names.
- -Path String[]
- Workbook paths resolved with filesystem wildcard support.
- -LiteralPath String[]
- Literal workbook paths, including FileInfo.FullName and provider PSPath.
- -AllowHttp SwitchParameter
- Allow HTTP workbook downloads in addition to HTTPS.
- -Uri Uri
- Remote workbook URI 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.