# Add-OfficeExcelTableRow

Appends rows to an existing Excel table. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice Cmdlet Reference.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Excel.ExcelDocument` `System.Object`

**Source**

[AddOfficeExcelTableRowCommand.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Excel/AddOfficeExcelTableRowCommand.cs#L38) 

Appends rows to an existing Excel table.

## Syntax

```
Add-OfficeExcelTableRow
[-Document <ExcelDocument>]
[-InputObject] <Object>
[-PassThru]
[-Sheet <OfficeSheetSelector>]
-Table <Object>
[<CommonParameters>]
```

[#](#method-add-officeexceltablerow-exceldocument-object-switchparameter-officesheetselector-object)

Parameter set: `Default`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Update Existing Excel Workbooks](/docs/pswriteoffice/excel-update-existing/) Guide
  
  Replace values, edit rows, append table data, and make targeted workbook changes without rebuilding every sheet.

## Examples

### Append rows to a table

```powershell
$servers = @(
    [pscustomobject]@{ Name = 'NW-APP-07'; Role = 'Application'; Site = 'Warsaw' }
    [pscustomobject]@{ Name = 'NW-SQL-03'; Role = 'Database'; Site = 'Frankfurt' }
)
Open-OfficeExcel -Path .\Reports\Inventory.xlsx {
    Add-OfficeExcelTableRow -Sheet Servers -Table Servers -InputObject $servers
}
```

Adds two new servers to the Servers table; the table range grows to include them.

### Log each deployment as it finishes

```powershell
$book = Open-OfficeExcel -Path .\Reports\Deployments.xlsx
foreach ($target in 'NW-APP-01', 'NW-APP-02', 'NW-APP-03') {
    $result = Invoke-Command -ComputerName $target { & C:\Deploy\Install.ps1 -Release '2026.10.2' }
    [pscustomobject]@{ Server = $target; Release = '2026.10.2'; Finished = Get-Date; Status = $result.Status } |
        Add-OfficeExcelTableRow -Document $book -Sheet Log -Table Deployments
}
Save-OfficeExcel -Document $book -PassThru | Close-OfficeExcel
```

Appends one row per completed deployment to the Deployments table of a workbook kept open for the whole run.

## Parameters

**-Document ExcelDocument optionalpipeline: True (ByValue)**

Caller-owned workbook; omission uses the enclosing Excel content block.

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

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

**-PassThru SwitchParameter optional**

Emits the native result after the operation.

**-Sheet OfficeSheetSelector optionalaliases: WorksheetName**

Worksheet name, one-based position or native worksheet object. Multi-sheet commands also accept wildcard names.

**-Table Object required**

Native Excel table used to resolve the source range or header.

## 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:76E7DB14FBAF88238CD02418D2210FB54BA437C0324861564D16238A822E8E35 -->
