Project

PSWriteOffice

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

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

ConvertTo-OfficeOpenDocument

Module
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.

Syntax

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

Examples

Convert Word to ODT and reject lossy conversion.

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

Parameters

-ExcelOptions ExcelOpenDocumentConversionOptions optional
Optional Excel-to-ODS conversion settings.
-FailOnLoss SwitchParameter optional
Throw when the conversion approximates, skips, or cannot map a feature.
-OutputPath String requiredposition: 1
Destination ODT, ODS, or ODP path.
-Path String requiredposition: 0sets: Path
Path to a DOCX, XLSX, or PPTX file.
-PowerPointOptions PowerPointOpenDocumentConversionOptions optional
Optional PowerPoint-to-ODP conversion settings.
-WordOptions WordOpenDocumentConversionOptions optional
Optional Word-to-ODT conversion settings.
-WordDocument WordDocument requiredpipeline: True (ByValue)sets: Word
Open Word document.
-ExcelDocument ExcelDocument requiredpipeline: True (ByValue)sets: Excel
Open Excel workbook.
-PowerPointPresentation PowerPointPresentation requiredpipeline: True (ByValue)sets: PowerPoint
Open PowerPoint presentation.

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.