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

Add-OfficeMarkdownTable

Aliases: MarkdownTable
Namespace PSWriteOffice
Aliases
MarkdownTable
Inputs
OfficeIMO.Markdown.MarkdownDoc System.Object
Outputs
OfficeIMO.Markdown.MarkdownDoc

Adds a Markdown table from objects.

Remarks

Adds a Markdown table from objects.

Examples

Authored help example

Add a table from input objects.

PS>


MarkdownTable -InputObject $rows
        

Appends a Markdown table using the supplied objects.

Append multiple tables to the same document.

PS>


$doc = New-OfficeMarkdown -Path .\Report.md -NoSave -PassThru
              $doc | MarkdownTable -InputObject $summary -PassThru | MarkdownTable -InputObject $details
        

Creates two tables in sequence within the same Markdown document.

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-OfficeMarkdownTable [-CollectionSeparator <String>] [-DictionaryEntrySeparator <String>] [-DictionaryKeyValueSeparator <String>] [-DisableAutoAlign] -InputObject <Object> [-MaxCollectionItems <Int32>] [-MaxNestingDepth <Int32>] [-PassThru] [-View <Normal|Transpose>] [<CommonParameters>]
#
Parameter set: Context

Parameters

CollectionSeparator String optionalposition: namedpipeline: False
Text used between items when a cell contains a collection.
DictionaryEntrySeparator String optionalposition: namedpipeline: False
Text used between entries when a cell contains a dictionary.
DictionaryKeyValueSeparator String optionalposition: namedpipeline: False
Text used between a dictionary key and value.
DisableAutoAlign SwitchParameter optionalposition: namedpipeline: False
Disable automatic alignment heuristics for tables.
InputObject Object requiredposition: 0pipeline: True (ByValue)
Objects to convert into a Markdown table.
MaxCollectionItems Int32 optionalposition: namedpipeline: False
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 optionalposition: namedpipeline: False
Maximum nesting depth allowed while normalizing one cell value. Defaults to 64; increase explicitly for trusted deeper values.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the Markdown document after appending the table.
View OfficeTableView optionalposition: namedpipeline: Falsevalues: 2
Projection to apply before writing the table.
Possible values: Normal, Transpose

Outputs

OfficeIMO.Markdown.MarkdownDoc

Add-OfficeMarkdownTable [-CollectionSeparator <String>] [-DictionaryEntrySeparator <String>] [-DictionaryKeyValueSeparator <String>] [-DisableAutoAlign] -Document <MarkdownDoc> -InputObject <Object> [-MaxCollectionItems <Int32>] [-MaxNestingDepth <Int32>] [-PassThru] [-View <Normal|Transpose>] [<CommonParameters>]
#
Parameter set: Document

Parameters

CollectionSeparator String optionalposition: namedpipeline: False
Text used between items when a cell contains a collection.
DictionaryEntrySeparator String optionalposition: namedpipeline: False
Text used between entries when a cell contains a dictionary.
DictionaryKeyValueSeparator String optionalposition: namedpipeline: False
Text used between a dictionary key and value.
DisableAutoAlign SwitchParameter optionalposition: namedpipeline: False
Disable automatic alignment heuristics for tables.
Document MarkdownDoc requiredposition: namedpipeline: True (ByValue)
Markdown document to update outside the DSL context.
InputObject Object requiredposition: 0pipeline: True (ByValue)
Objects to convert into a Markdown table.
MaxCollectionItems Int32 optionalposition: namedpipeline: False
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 optionalposition: namedpipeline: False
Maximum nesting depth allowed while normalizing one cell value. Defaults to 64; increase explicitly for trusted deeper values.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the Markdown document after appending the table.
View OfficeTableView optionalposition: namedpipeline: Falsevalues: 2
Projection to apply before writing the table.
Possible values: Normal, Transpose

Outputs

OfficeIMO.Markdown.MarkdownDoc

Add-OfficeMarkdownTable [-CollectionSeparator <String>] [-DictionaryEntrySeparator <String>] [-DictionaryKeyValueSeparator <String>] [-DisableAutoAlign] -Document <MarkdownDoc> -InputObject <Object> [-MaxCollectionItems <Int32>] [-MaxNestingDepth <Int32>] [-PassThru] [-View <Normal|Transpose>] [<CommonParameters>]
#
Parameter set: PipelineDocument

Parameters

CollectionSeparator String optionalposition: namedpipeline: False
Text used between items when a cell contains a collection.
DictionaryEntrySeparator String optionalposition: namedpipeline: False
Text used between entries when a cell contains a dictionary.
DictionaryKeyValueSeparator String optionalposition: namedpipeline: False
Text used between a dictionary key and value.
DisableAutoAlign SwitchParameter optionalposition: namedpipeline: False
Disable automatic alignment heuristics for tables.
Document MarkdownDoc requiredposition: namedpipeline: True (ByValue)
Markdown document to update outside the DSL context.
InputObject Object requiredposition: 0pipeline: True (ByValue)
Objects to convert into a Markdown table.
MaxCollectionItems Int32 optionalposition: namedpipeline: False
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 optionalposition: namedpipeline: False
Maximum nesting depth allowed while normalizing one cell value. Defaults to 64; increase explicitly for trusted deeper values.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the Markdown document after appending the table.
View OfficeTableView optionalposition: namedpipeline: Falsevalues: 2
Projection to apply before writing the table.
Possible values: Normal, Transpose

Outputs

OfficeIMO.Markdown.MarkdownDoc