Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
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

Authored help example

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.