Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

New-OfficeWordTableCell

Aliases: WordTableCellSpec
Namespace PSWriteOffice
Aliases
WordTableCellSpec
Inputs
None
Outputs
PSWriteOffice.Services.Table.OfficeTableCellSpec

Creates a reusable Word table cell definition for explicit table rows.

Remarks

Creates a reusable Word table cell definition for explicit table rows.

Examples

Authored help example

Create a full-width Word table section row.

PS>


$row = @(New-OfficeWordTableCell -Text 'Identity systems' -ColumnSpan 3)
        

The returned cell can be passed to WordTable inside explicit row arrays.

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

New-OfficeWordTableCell [-Align <Left>] [-Bold] [-ColumnSpan <Int32>] [-FillColor <String>] [-FontSize <Double>] [-Italic] [-RowSpan <Int32>] [-Run <Object[]>] [-Strike] [-Text <String>] [-TextColor <String>] [-Underline] [-UnderlineStyle <Single>] [-VerticalAlign <Top|Center|Bottom>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Align WordParagraphAlignment optionalposition: namedpipeline: Falsevalues: 12
Horizontal cell alignment.
Possible values: Left, Start, Center, Right, End, Both, MediumKashida, Distribute, NumTab, HighKashida, LowKashida, ThaiDistribute
Bold SwitchParameter optionalposition: namedpipeline: False
Render the cell text in bold.
ColumnSpan Int32 optionalposition: namedpipeline: False
Number of logical columns covered by the cell.
FillColor String optionalposition: namedpipeline: Falsealiases: BackgroundColor, CellFill
Cell fill color. Named colors and hexadecimal colors are accepted.
FontSize Double optionalposition: namedpipeline: False
Cell font size in points.
Italic SwitchParameter optionalposition: namedpipeline: False
Render the cell text in italics.
RowSpan Int32 optionalposition: namedpipeline: False
Number of logical rows covered by the cell.
Run Object[] optionalposition: namedpipeline: Falsealiases: Runs
Rich text runs for the cell. Each run can be created with TextRun/WordTextRun or provided as a hashtable/object.
Strike SwitchParameter optionalposition: namedpipeline: False
Render the cell text with strikethrough.
Text String optionalposition: 0pipeline: False
Cell text.
TextColor String optionalposition: namedpipeline: Falsealiases: Color, FontColor
Cell text color. Named colors and hexadecimal colors are accepted.
Underline SwitchParameter optionalposition: namedpipeline: False
Render the cell text with underline.
UnderlineStyle WordUnderlineStyle optionalposition: namedpipeline: Falsevalues: 17
Optional Word underline style.
Possible values: Single, Words, Double, Thick, Dotted, DottedHeavy, Dash, DashedHeavy, DashLong, DashLongHeavy, DotDash, DashDotHeavy, DotDotDash, DashDotDotHeavy, Wave, WavyHeavy, WavyDouble
VerticalAlign WordTableVerticalAlignment optionalposition: namedpipeline: Falsevalues: 3
Vertical cell alignment.
Possible values: Top, Center, Bottom

Outputs

PSWriteOffice.Services.Table.OfficeTableCellSpec: Describes a logical table cell that can be rendered by multiple Office table surfaces.