API Reference

Cmdlet

ConvertTo-OfficeMarkdown

Namespace PSWriteOffice
Inputs
System.Object
Outputs
OfficeIMO.Markdown.MarkdownDoc System.String

Converts objects into a Markdown table.

Remarks

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

Examples

Authored help example

Example 1: Convert objects to Markdown table.

PS>


$markdown = $data | ConvertTo-OfficeMarkdown
        

Generates Markdown table text from the input objects.

Example 2: Emit a Markdown document for further editing.

PS>


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

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

Example 3: Disable auto alignment.

PS>


$markdown = $data | ConvertTo-OfficeMarkdown -DisableAutoAlign
        

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

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

ConvertTo-OfficeMarkdown [-DisableAutoAlign] [-InputObject <Object>] [-PassThru] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

DisableAutoAlign SwitchParameter optionalposition: namedpipeline: False
Disable automatic alignment heuristics for tables.
InputObject Object optionalposition: namedpipeline: True (ByValue)
Objects to convert into Markdown.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit a Markdown document object instead of text.

Outputs

OfficeIMO.Markdown.MarkdownDoc, System.String