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-OfficeWordTableCell

Aliases: WordTableCell
Module
PSWriteOffice
Aliases
WordTableCell
Inputs
OfficeIMO.Word.WordTable
Outputs
OfficeIMO.Word.WordTableCell

Enters a specific table cell and executes nested DSL content inside it.

Syntax

Add-OfficeWordTableCell
-Column <Int32>
[[-Content] <ScriptBlock>]
[-PassThru]
-Row <Int32>
[-Run <Object[]>]
[-Text <String>]
[<CommonParameters>]
#
Parameter set: Context
Add-OfficeWordTableCell
-Column <Int32>
[[-Content] <ScriptBlock>]
[-PassThru]
-Row <Int32>
[-Run <Object[]>]
-Table <WordTable>
[-Text <String>]
[<CommonParameters>]
#
Parameter set: Table

Description

Use this to add paragraphs, lists, images, or nested tables inside a cell selected by row and column.

Examples

Add nested content to a table cell.

WordTable -InputObject $Rows { WordTableCell -Row 1 -Column 0 { WordParagraph { WordText 'Details' } } }

Targets the data cell at row 1, column 0 and writes text inside it.

Parameters

-Column Int32 required
Zero-based column index.
-Content ScriptBlock optionalposition: 0
DSL content executed inside the selected cell.
-PassThru SwitchParameter optional
Emit the selected WordTableCell.
-Row Int32 required
Zero-based row index.
-Run Object[] optionalaliases: Runs
Rich text runs to append to the selected cell before nested content runs.
-Text String optional
Text to append to the selected cell before nested content runs.
-Table WordTable requiredpipeline: True (ByValue)sets: Table
Optional table to target outside the active DSL table scope.

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.