# ConvertTo-OfficeMarkdown

Converts objects into a Markdown table. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

Project

PSWriteOffice

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

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`System.Object`

**Outputs**

`System.String` `OfficeIMO.Markdown.MarkdownDoc`

**Source**

[ConvertToOfficeMarkdownCommand.cs:32](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Markdown/ConvertToOfficeMarkdownCommand.cs#L32) 

Converts objects into a Markdown table.

## Syntax

```
ConvertTo-OfficeMarkdown
[-CollectionSeparator <String>]
[-DictionaryEntrySeparator <String>]
[-DictionaryKeyValueSeparator <String>]
[-DisableAutoAlign]
[-InputObject <Object>]
[-MaxCollectionItems <Int32>]
[-MaxNestingDepth <Int32>]
[-PassThru]
[<CommonParameters>]
```

[#](#method-convertto-officemarkdown-string-string-string-switchparameter-object-int32-int32-switchparameter)

Parameter set: `All Parameter Sets`

## Description

Returns Markdown text by default; use -PassThru to emit a MarkdownDoc.

## Examples

### Convert objects to Markdown table.

```powershell
$markdown = $data | ConvertTo-OfficeMarkdown
```

Generates Markdown table text from the input objects.

### Emit a Markdown document for further editing.

```powershell
$doc = $data | ConvertTo-OfficeMarkdown -PassThru
$doc.P('Totals above'); $doc.ToMarkdown()
```

Builds a table and appends more content using the MarkdownDoc API.

### Disable auto alignment.

```powershell
$markdown = $data | ConvertTo-OfficeMarkdown -DisableAutoAlign
```

Forces left-aligned columns instead of auto-aligned output.

## Parameters

**-CollectionSeparator String optional**

Text used between items when a cell contains a collection.

**-DictionaryEntrySeparator String optional**

Text used between entries when a cell contains a dictionary.

**-DictionaryKeyValueSeparator String optional**

Text used between a dictionary key and value.

**-DisableAutoAlign SwitchParameter optional**

Disable automatic alignment heuristics for tables.

**-InputObject Object optionalpipeline: True (ByValue)**

Objects to convert into Markdown.

**-MaxCollectionItems Int32 optional**

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 optional**

Maximum nesting depth allowed while normalizing one cell value. Defaults to 64; increase explicitly for trusted deeper values.

**-PassThru SwitchParameter optional**

Emit a Markdown document object instead of text.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:2119B73C49827AC060B5A0306C775BE0AD352B8282556D5079619B67BF3FA2B0 -->
