API Reference
Cmdlet
Add-OfficeExcelReportTable
Adds an object table to the current Excel report sheet using the OfficeIMO sheet composer.
Remarks
Adds an object table to the current Excel report sheet using the OfficeIMO sheet composer.
Examples
Add a styled report table from objects.
PS>
$rows = @(
[pscustomobject]@{ Area = 'PDF'; Status = 'Ready' }
[pscustomobject]@{ Area = 'Word'; Status = 'Review' }
)
New-OfficeExcel -Path .\Operations.xlsx {
Add-OfficeExcelReportSheet -Name Summary {
Add-OfficeExcelReportTable -InputObject $rows -Title 'Documentation coverage' -TableStyle TableStyleMedium9
}
}
Renders object rows as a formatted Excel table through the sheet composer.
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
Add-OfficeExcelReportTable -InputObject <Object[]> [-NoAutoFilter] [-NoAutoFormatDynamicCollections] [-NoFreezeHeaderRow] [-NoRowStripes] [-PassThru] [-ShowColumnStripes] [-ShowFirstColumn] [-ShowLastColumn] [-TableStyle <String>] [-Title <String>] [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- InputObject Object[]
- Objects to flatten and render as a table.
- NoAutoFilter SwitchParameter
- Disable AutoFilter dropdowns.
- NoAutoFormatDynamicCollections SwitchParameter
- Disable composer auto-formatting for dynamic collection columns.
- NoFreezeHeaderRow SwitchParameter
- Do not freeze through the table header row.
- NoRowStripes SwitchParameter
- Disable alternating row stripes for the generated table.
- PassThru SwitchParameter
- Emit the A1 range used by the generated table.
- ShowColumnStripes SwitchParameter
- Enable alternating column stripes for the generated table.
- ShowFirstColumn SwitchParameter
- Emphasize the first table column when the selected style supports it.
- ShowLastColumn SwitchParameter
- Emphasize the last table column when the selected style supports it.
- TableStyle String
- Built-in table style to apply.
- Title String
- Optional section title displayed above the table.
Outputs
System.Object