# ConvertFrom-OfficeImage

Exports a recognized image as editable Excel, Word, text, Markdown, HTML, JSON, CSV or searchable PDF.

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

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Pdf.Ocr.PdfSearchableOcrReview`

**Outputs**

`System.IO.FileInfo` `PSWriteOffice.Services.Ocr.OfficeImageConversionResult`

**Source**

[ConvertFromOfficeImageCommand.cs:35](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Ocr/ConvertFromOfficeImageCommand.cs#L35) 

Exports a recognized image as editable Excel, Word, text, Markdown, HTML, JSON, CSV or searchable PDF.

## Syntax

```
ConvertFrom-OfficeImage
[-CsvOptions <CsvSaveOptions>]
[-ExcelOptions <PdfTablesToExcelOptions>]
[-FirstRowIsHeader]
[-Force]
[-HtmlOptions <PdfToHtmlOptions>]
[-InputObject] <PdfSearchableOcrReview>
[-OutputPath] <String>
[-PassThru]
[-WordOptions <PdfToWordOptions>]
[<CommonParameters>]
```

[#](#method-convertfrom-officeimage-csvsaveoptions-pdftablestoexceloptions-switchparameter-switchparameter-pdftohtmloptions-pdfsearchableocrreview-string-switchparameter-pdftowordoptions)

Parameter set: `All Parameter Sets`

## Description

Recognize once with Get-OfficeImageDocument, inspect its evidence, then reuse that snapshot for each output. Excel and CSV contain detected tables only. CSV requires exactly one table. Empty recognition or missing tables fail before output publication.

## Examples

### Export an image as Excel and Word.

```powershell
$image = Get-OfficeImageDocument -Path .\Ledger.png
$image | ConvertFrom-OfficeImage -OutputPath .\Ledger.xlsx -FirstRowIsHeader -PassThru
$image | ConvertFrom-OfficeImage -OutputPath .\Ledger.docx
```

Excel receives caller-confirmed headers and typed columns. PassThru returns recognition evidence and the format conversion report.

### Customize CSV formatting while retaining formula escaping.

```powershell
$csv = @{ Delimiter = ';'; FormulaInjectionPolicy = 'Escape' }
$image | ConvertFrom-OfficeImage -OutputPath .\Ledger.csv -CsvOptions $csv
```

Set Escape explicitly when customizing CSV formatting for spreadsheet consumption. Every recognized table row is written as data without a synthesized header, regardless of IncludeHeader.

## Parameters

**-CsvOptions CsvSaveOptions optional**

CSV field formatting and formula policy. When omitted, formula-like source text is escaped, including negative numeric text. Supplied options retain their FormulaInjectionPolicy; a new CsvSaveOptions object defaults to Preserve. Set Escape explicitly when customizing options for spreadsheet consumption. Every recognized table row is written as data without a synthesized header, regardless of IncludeHeader. This command controls UTF-8, uncompressed file output and replacement through Force; CsvOptions controls field formatting and formula handling.

**-ExcelOptions PdfTablesToExcelOptions optional**

Advanced Excel typing, culture, row limit and table formatting settings.

**-FirstRowIsHeader SwitchParameter optional**

Confirm the first row of each Excel table with unknown schema as column headers.

**-Force SwitchParameter optional**

Replace an existing destination after conversion succeeds.

**-HtmlOptions PdfToHtmlOptions optional**

Advanced HTML projection settings. Word and HTML defaults exclude the original scan from editable content.

**-InputObject PdfSearchableOcrReview requiredposition: 0pipeline: True (ByValue)**

Recognized image review returned by Get-OfficeImageDocument.

**-OutputPath String requiredposition: 1**

Output path. The extension selects .xlsx, .docx, .pdf, .txt, .md, .html, .json or .csv.

**-PassThru SwitchParameter optional**

Return output location, source review and format report instead of FileInfo.

**-WordOptions PdfToWordOptions optional**

Advanced Word projection settings.

## 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).

## Outputs

PSWriteOffice.Services.Ocr.OfficeImageConversionResult: Output location, recognition evidence and format projection report from an image export.

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:1D1D980D87D1D3EA7F390AE8D30B99F3B2500AE46F4AB4B5EE87BDC54B6E1F7C -->
