# Export-OfficeExcelRangeImage

Exports one worksheet range as an image file. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

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

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Outputs**

`OfficeIMO.Drawing.OfficeImageExportResult`

**Source**

[ExportOfficeExcelRangeImageCommand.cs:16](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/ExportOfficeExcelRangeImageCommand.cs#L16) 

Exports one worksheet range as an image file.

## Syntax

```
Export-OfficeExcelRangeImage
[-Force]
[-Format <OfficeImageExportFormat>]
[-Options <ExcelImageExportOptions>]
[[-OutputPath] <String>]
[-PassThru]
[-Path] <String>
-Range <String>
-WorksheetName <String>
[<CommonParameters>]
```

[#](#method-export-officeexcelrangeimage-switchparameter-officeimageexportformat-excelimageexportoptions-string-switchparameter-string-string-string)

Parameter set: `Path`

```
Export-OfficeExcelRangeImage
-Document <ExcelDocument>
[-Force]
[-Format <OfficeImageExportFormat>]
[-Options <ExcelImageExportOptions>]
[[-OutputPath] <String>]
[-PassThru]
-Range <String>
-WorksheetName <String>
[<CommonParameters>]
```

[#](#method-export-officeexcelrangeimage-exceldocument-switchparameter-officeimageexportformat-excelimageexportoptions-string-switchparameter-string-string)

Parameter set: `Document`

## Examples

### Export a report range for use in an email.

```powershell
Export-OfficeExcelRangeImage -Path .\Report.xlsx -WorksheetName Summary -Range A1:H20 -OutputPath .\summary.png
```

## Parameters

**-Force SwitchParameter optional**

Replace an existing destination file.

**-Format OfficeImageExportFormat optional**

Output image format.

Possible values: `Png`, `Svg`, `Jpeg`, `Tiff`, `Webp`, `Bmp`, `Pbm`, `Tga`, `Icon`

**-Options ExcelImageExportOptions optional**

Optional rendering, size, font, and diagnostic policy settings.

**-OutputPath String optionalposition: 1**

Optional destination image file. When omitted, returns the in-memory image result only.

**-PassThru SwitchParameter optional**

Emit the structured image export result when a destination path is used.

**-Path String requiredposition: 0sets: Path**

Path to the workbook.

**-Range String required**

A1 range address to export.

**-WorksheetName String required**

Name of the worksheet containing the range.

**-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document**

Open workbook instance.

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

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:405D5E0FF6ADFF1BA271D18CB48F7A83CC1865FAC901ABD4EA710B8D25F529D9 -->
