Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Add-OfficePowerPointTable

Aliases: PptTable
Module
PSWriteOffice
Aliases
PptTable
Inputs
OfficeIMO.PowerPoint.PowerPointSlide

Adds a table to a PowerPoint slide.

Syntax

Add-OfficePowerPointTable
[-CollectionSeparator <String>]
[-DictionaryEntrySeparator <String>]
[-DictionaryKeyValueSeparator <String>]
[-Header <String[]>]
[-Height <Double>]
[-InputObject] <Object>
[-MaxCollectionItems <Int32>]
[-MaxNestingDepth <Int32>]
[-NoHeader]
[-PassThru]
[[-Slide] <PowerPointSlide>]
[-StyleId <String>]
[-View <Normal|Transpose>]
[-Width <Double>]
[-X <Double>]
[-Y <Double>]
[<CommonParameters>]
#
Parameter set: InputObject
Add-OfficePowerPointTable
-Columns <Int32>
[-Height <Double>]
[-PassThru]
-Rows <Int32>
[[-Slide] <PowerPointSlide>]
[-StyleId <String>]
[-Width <Double>]
[-X <Double>]
[-Y <Double>]
[<CommonParameters>]
#
Parameter set: Size

Description

Builds a table from data rows or creates a blank grid with a fixed size.

Examples

Create a table from objects.

$rows = @([pscustomobject]@{ Item='Alpha'; Qty=2 }, [pscustomobject]@{ Item='Beta'; Qty=4 })
Add-OfficePowerPointTable -Slide $slide -InputObject $rows -X 60 -Y 140 -Width 420 -Height 200

Creates a table with headers and two data rows.

Parameters

-CollectionSeparator String optionalsets: InputObject
Text used between items when a cell contains a collection.
-DictionaryEntrySeparator String optionalsets: InputObject
Text used between entries when a cell contains a dictionary.
-DictionaryKeyValueSeparator String optionalsets: InputObject
Text used between a dictionary key and value.
-Header String[] optionalaliases: Headerssets: InputObject
Optional header order to apply to the table.
-Height Double optional
Table height in points.
-InputObject Object requiredposition: 1aliases: Datasets: InputObject
Source objects to convert into table rows.
-MaxCollectionItems Int32 optionalsets: InputObject
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 optionalsets: InputObject
Maximum nesting depth allowed while normalizing one cell value. Defaults to 64; increase explicitly for trusted deeper values.
-NoHeader SwitchParameter optionalsets: InputObject
Skip writing header row.
-PassThru SwitchParameter optional
Emit the object created or changed by the command.
-Slide PowerPointSlide optionalposition: 0pipeline: True (ByValue)
Target slide that will receive the table (optional inside DSL).
-StyleId String optional
Optional table style ID (GUID string).
-View OfficeTableView optionalsets: InputObject
Projection to apply before writing the table.
Possible values: Normal, Transpose
-Width Double optional
Table width in points.
-X Double optional
Left offset (in points) from the slide origin.
-Y Double optional
Top offset (in points) from the slide origin.
-Columns Int32 requiredsets: Size
Column count for an empty table.
-Rows Int32 requiredsets: Size
Row count for an empty 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.