# Add-OfficeExcelReportTable

Adds a titled, styled table to the report. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice Cmdlet Reference.

Cmdlet 

Aliases: ExcelReportTable

**Module**

`PSWriteOffice`

**Aliases**

`ExcelReportTable`

**Inputs**

`System.Object`

**Source**

[AddOfficeExcelReportTableCommand.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Excel/AddOfficeExcelReportTableCommand.cs#L37) 

Adds a titled, styled table to the report.

## Syntax

```
Add-OfficeExcelReportTable
[-CollectionSeparator <String>]
[-ColumnFormat <Hashtable>]
[-ExcludeProperty <String[]>]
[-FlattenOptions <OfficeObjectFlattenOptions>]
[-InputObject] <Object>
[-MaxCells <Int64>]
[-MaxRows <Int32>]
[-Name <String>]
[-NoAutoFilter]
[-NoAutoFormatDynamicCollections]
[-NoFreeze]
[-NoRowStripes]
[-PassThru]
[-Property <String[]>]
[-ShowColumnStripes]
[-ShowFirstColumn]
[-ShowLastColumn]
[-TableStyle <ExcelTableStyle>]
[[-Title] <String>]
[<CommonParameters>]
```

[#](#member-ee67354a58cb78a540a8a6d8)

Parameter set: `Default`

## Examples

### Add a titled table

```powershell
New-OfficeExcel -Path .\Reports\Operations.xlsx {
    ExcelReportSheet 'Summary' {
        ExcelReportTable (Get-Service | Where-Object Status -eq 'Stopped') 'Stopped services'
    }
}
```

Adds a styled table with a title to the report.

### Choose the columns to show

```powershell
$assets = Import-OfficeCsv -Path .\Data\Assets.csv
New-OfficeExcel -Path .\Reports\Asset-Review.xlsx {
    ExcelReportSheet 'Assets' {
        ExcelReportTitle 'Laptops due for replacement'
        ExcelReportTable ($assets | Where-Object AgeYears -ge 4) 'Due this year' -Property AssetTag, User, Model, Purchased, AgeYears -Name DueLaptops -ColumnFormat @{ Purchased = 'Date'; AgeYears = '0.0' }
    }
}
```

Shows only the columns readers need from a wide asset export and leaves the internal identifiers out.

## Parameters

**-CollectionSeparator String optional**

Text inserted between collection values flattened into one cell.

**-ColumnFormat Hashtable optional**

Maps column headers to number-format presets, format codes or per-column option hashtables.

**-ExcludeProperty String[] optional**

Exclude specific properties from exported objects.

**-FlattenOptions OfficeObjectFlattenOptions optional**

Nested-value projection policy; accepts a native options object or hashtable.

**-InputObject Object requiredposition: 0pipeline: True (ByValue)**

Objects, dictionaries or native tabular data supplied directly or through the pipeline.

**-MaxCells Int64 optional**

Maximum number of cells the writer may write across the selected columns, including the header row. The writer default applies when omitted.

**-MaxRows Int32 optional**

Maximum number of data rows the writer may write after input projection. The writer default applies when omitted.

**-Name String optional**

Named range name.

**-NoAutoFilter SwitchParameter optional**

Omits table filter buttons.

**-NoAutoFormatDynamicCollections SwitchParameter optional**

Disable composer auto-formatting for dynamic collection columns.

**-NoFreeze SwitchParameter optional**

Keeps the header row scrollable.

**-NoRowStripes SwitchParameter optional**

Disables alternating row bands. An explicit false value enables them.

**-PassThru SwitchParameter optional**

Emits the native result after the operation.

**-Property String[] optional**

Properties to include, in the requested column order.

**-ShowColumnStripes SwitchParameter optional**

Enables alternating column bands; explicit false clears them.

**-ShowFirstColumn SwitchParameter optional**

Emphasizes the first table column; explicit false removes the emphasis.

**-ShowLastColumn SwitchParameter optional**

Emphasizes the last table column; explicit false removes the emphasis.

**-TableStyle ExcelTableStyle optional**

Built-in table style to apply.

Possible values: `TableStyleLight1`, `TableStyleLight2`, `TableStyleLight3`, `TableStyleLight4`, `TableStyleLight5`, `TableStyleLight6`, `TableStyleLight7`, `TableStyleLight8`, `TableStyleLight9`, `TableStyleLight10`, `TableStyleLight11`, `TableStyleLight12`, `TableStyleLight13`, `TableStyleLight14`, `TableStyleLight15`, `TableStyleLight16`, `TableStyleLight17`, `TableStyleLight18`, `TableStyleLight19`, `TableStyleLight20`, `TableStyleLight21`, `TableStyleMedium1`, `TableStyleMedium2`, `TableStyleMedium3`, `TableStyleMedium4`, `TableStyleMedium5`, `TableStyleMedium6`, `TableStyleMedium7`, `TableStyleMedium8`, `TableStyleMedium9`, `TableStyleMedium10`, `TableStyleMedium11`, `TableStyleMedium12`, `TableStyleMedium13`, `TableStyleMedium14`, `TableStyleMedium15`, `TableStyleMedium16`, `TableStyleMedium17`, `TableStyleMedium18`, `TableStyleMedium19`, `TableStyleMedium20`, `TableStyleMedium21`, `TableStyleMedium22`, `TableStyleMedium23`, `TableStyleMedium24`, `TableStyleMedium25`, `TableStyleMedium26`, `TableStyleMedium27`, `TableStyleMedium28`, `TableStyleDark1`, `TableStyleDark2`, `TableStyleDark3`, `TableStyleDark4`, `TableStyleDark5`, `TableStyleDark6`, `TableStyleDark7`, `TableStyleDark8`, `TableStyleDark9`, `TableStyleDark10`, `TableStyleDark11`

**-Title String optionalposition: 1**

Chart title.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:C75B00A85FE2D00E8C402B73F9802A5A49D63C364D0AE5474812E71ECCAA5C7B -->
