Evotec

Project

PSWriteOffice

PSWriteOffice is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 144
Forks 12
Open issues 16
PowerShell Gallery downloads 150,904
Release v0.2.0
Language: C# Updated: 2026-04-06

API Reference

Cmdlet

Add-OfficeExcelTable

Namespace PSWriteOffice
Inputs
None
Outputs
System.Object

Writes tabular data to the current worksheet and formats it as an Excel table.

Remarks

Accepts objects (PSCustomObject, hashtables, POCOs) and converts them into an Excel table with optional styling.

Examples

Authored help example

Insert a table starting at A1.

PS>


$data = @([pscustomobject]@{ Region='NA'; Revenue=100 }, [pscustomobject]@{ Region='EMEA'; Revenue=150 })
              ExcelSheet 'Data' { Add-OfficeExcelTable -Data $data -TableName 'Sales' }
        

Writes two rows and formats them as a styled Excel table.

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-OfficeExcelTable [-AutoFit] -Data <Object[]> [-NoAutoFilter] [-NoHeader] [-PassThru] [-StartColumn <Int32>] [-StartRow <Int32>] [-TableName <String>] [-TableStyle <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AutoFit SwitchParameter optionalposition: namedpipeline: False
Auto-fit the table columns after insertion.
Data Object[] requiredposition: namedpipeline: False
Source objects to convert into table rows.
NoAutoFilter SwitchParameter optionalposition: namedpipeline: False
Disable AutoFilter dropdowns.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Skip writing headers.
PassThru SwitchParameter optionalposition: namedpipeline: False
Return the created range string.
StartColumn Int32 optionalposition: namedpipeline: False
Starting column for the data (1-based).
StartRow Int32 optionalposition: namedpipeline: False
Starting row for the data (1-based).
TableName String optionalposition: namedpipeline: False
Name to assign to the table.
TableStyle String optionalposition: namedpipeline: False
Built-in table style to apply.

Outputs

System.Object