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

ConvertTo-OfficeOpenDocument

Namespace PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument OfficeIMO.PowerPoint.PowerPointPresentation OfficeIMO.Word.WordDocument
Outputs
OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdtDocument] OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdsDocument] OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdpPresentation]

Converts Word, Excel, or PowerPoint content to native OpenDocument with fidelity evidence.

Remarks

Converts Word, Excel, or PowerPoint content to native OpenDocument with fidelity evidence.

Examples

Authored help example

Convert Word to ODT and reject lossy conversion.

PS>


$options = New-OfficeWordOpenDocumentOptions -IncludeImages -IncludeHeadersAndFooters
            ConvertTo-OfficeOpenDocument -Path .\Report.docx -OutputPath .\Report.odt -WordOptions $options -FailOnLoss
        

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-OfficeOpenDocument [-ExcelOptions <ExcelOpenDocumentConversionOptions>] [-FailOnLoss] -OutputPath <String> -Path <String> [-PowerPointOptions <PowerPointOpenDocumentConversionOptions>] [-WordOptions <WordOpenDocumentConversionOptions>] [<CommonParameters>]
#
Parameter set: Path

Parameters

ExcelOptions ExcelOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional Excel-to-ODS conversion settings.
FailOnLoss SwitchParameter optionalposition: namedpipeline: False
Throw when the conversion approximates, skips, or cannot map a feature.
OutputPath String requiredposition: 1pipeline: False
Destination ODT, ODS, or ODP path.
Path String requiredposition: 0pipeline: False
Path to a DOCX, XLSX, or PPTX file.
PowerPointOptions PowerPointOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional PowerPoint-to-ODP conversion settings.
WordOptions WordOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional Word-to-ODT conversion settings.

Outputs

OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdtDocument], OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdsDocument], OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdpPresentation]

ConvertTo-OfficeOpenDocument [-ExcelOptions <ExcelOpenDocumentConversionOptions>] [-FailOnLoss] -OutputPath <String> [-PowerPointOptions <PowerPointOpenDocumentConversionOptions>] -WordDocument <WordDocument> [-WordOptions <WordOpenDocumentConversionOptions>] [<CommonParameters>]
#
Parameter set: Word

Parameters

ExcelOptions ExcelOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional Excel-to-ODS conversion settings.
FailOnLoss SwitchParameter optionalposition: namedpipeline: False
Throw when the conversion approximates, skips, or cannot map a feature.
OutputPath String requiredposition: 1pipeline: False
Destination ODT, ODS, or ODP path.
PowerPointOptions PowerPointOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional PowerPoint-to-ODP conversion settings.
WordDocument WordDocument requiredposition: namedpipeline: True (ByValue)
Open Word document.
WordOptions WordOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional Word-to-ODT conversion settings.

Outputs

OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdtDocument], OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdsDocument], OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdpPresentation]

ConvertTo-OfficeOpenDocument -ExcelDocument <ExcelDocument> [-ExcelOptions <ExcelOpenDocumentConversionOptions>] [-FailOnLoss] -OutputPath <String> [-PowerPointOptions <PowerPointOpenDocumentConversionOptions>] [-WordOptions <WordOpenDocumentConversionOptions>] [<CommonParameters>]
#
Parameter set: Excel

Parameters

ExcelDocument ExcelDocument requiredposition: namedpipeline: True (ByValue)
Open Excel workbook.
ExcelOptions ExcelOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional Excel-to-ODS conversion settings.
FailOnLoss SwitchParameter optionalposition: namedpipeline: False
Throw when the conversion approximates, skips, or cannot map a feature.
OutputPath String requiredposition: 1pipeline: False
Destination ODT, ODS, or ODP path.
PowerPointOptions PowerPointOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional PowerPoint-to-ODP conversion settings.
WordOptions WordOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional Word-to-ODT conversion settings.

Outputs

OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdtDocument], OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdsDocument], OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdpPresentation]

ConvertTo-OfficeOpenDocument [-ExcelOptions <ExcelOpenDocumentConversionOptions>] [-FailOnLoss] -OutputPath <String> [-PowerPointOptions <PowerPointOpenDocumentConversionOptions>] -PowerPointPresentation <PowerPointPresentation> [-WordOptions <WordOpenDocumentConversionOptions>] [<CommonParameters>]
#
Parameter set: PowerPoint

Parameters

ExcelOptions ExcelOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional Excel-to-ODS conversion settings.
FailOnLoss SwitchParameter optionalposition: namedpipeline: False
Throw when the conversion approximates, skips, or cannot map a feature.
OutputPath String requiredposition: 1pipeline: False
Destination ODT, ODS, or ODP path.
PowerPointOptions PowerPointOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional PowerPoint-to-ODP conversion settings.
PowerPointPresentation PowerPointPresentation requiredposition: namedpipeline: True (ByValue)
Open PowerPoint presentation.
WordOptions WordOpenDocumentConversionOptions optionalposition: namedpipeline: False
Optional Word-to-ODT conversion settings.

Outputs

OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdtDocument], OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdsDocument], OfficeIMO.OpenDocument.OdfConversionResult[OfficeIMO.OpenDocument.OdpPresentation]