API Reference

Cmdlet

Add-OfficeExcelReportTable

Aliases: ExcelReportTable
Namespace PSWriteOffice
Aliases
ExcelReportTable
Inputs
System.Object

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

Authored help example

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 [-CollectionSeparator <String>] [-DictionaryEntrySeparator <String>] [-DictionaryKeyValueSeparator <String>] [-ExcludeProperty <String[]>] -InputObject <Object> [-MaxCollectionItems <Int32>] [-MaxNestingDepth <Int32>] [-NoAutoFilter] [-NoAutoFormatDynamicCollections] [-NoFreezeHeaderRow] [-NoRowStripes] [-PassThru] [-Property <String[]>] [-ShowColumnStripes] [-ShowFirstColumn] [-ShowLastColumn] [-TableStyle <String>] [-Title <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

CollectionSeparator String optionalposition: namedpipeline: False
Text used between items when a cell contains a collection.
DictionaryEntrySeparator String optionalposition: namedpipeline: False
Text used between entries when a cell contains a dictionary.
DictionaryKeyValueSeparator String optionalposition: namedpipeline: False
Text used between a dictionary key and value.
ExcludeProperty String[] optionalposition: namedpipeline: False
Properties to exclude from the rendered table.
InputObject Object requiredposition: 0pipeline: True (ByValue)aliases: Data
Objects to flatten and render as a table.
MaxCollectionItems Int32 optionalposition: namedpipeline: False
Maximum number of items allowed in one nested collection or dictionary cell. Defaults to 1,048,575; increase explicitly for trusted larger values.
MaxNestingDepth Int32 optionalposition: namedpipeline: False
Maximum nesting depth allowed while normalizing one cell value. Defaults to 64; increase explicitly for trusted deeper values.
NoAutoFilter SwitchParameter optionalposition: namedpipeline: False
Disable AutoFilter dropdowns.
NoAutoFormatDynamicCollections SwitchParameter optionalposition: namedpipeline: False
Disable composer auto-formatting for dynamic collection columns.
NoFreezeHeaderRow SwitchParameter optionalposition: namedpipeline: False
Do not freeze through the table header row.
NoRowStripes SwitchParameter optionalposition: namedpipeline: False
Disable alternating row stripes for the generated table.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the A1 range used by the generated table.
Property String[] optionalposition: namedpipeline: False
Properties to include, in the requested column order.
ShowColumnStripes SwitchParameter optionalposition: namedpipeline: False
Enable alternating column stripes for the generated table.
ShowFirstColumn SwitchParameter optionalposition: namedpipeline: False
Emphasize the first table column when the selected style supports it.
ShowLastColumn SwitchParameter optionalposition: namedpipeline: False
Emphasize the last table column when the selected style supports it.
TableStyle String optionalposition: namedpipeline: False
Built-in table style to apply.
Title String optionalposition: 1pipeline: False
Optional section title displayed above the table.