# Export-OfficeExcelChartImage

Exports one named worksheet chart as an image file.

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

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

Exports one named worksheet chart as an image file.

## Syntax

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

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

Parameter set: `Path`

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

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

Parameter set: `Document`

## Examples

### Export a chart for inline use in an email.

```powershell
Export-OfficeExcelChartImage -Path .\Report.xlsx -WorksheetName Summary -ChartName TicketStatus -OutputPath .\ticket-status.png
```

## Parameters

**-ChartName String required**

Chart name as stored in the worksheet drawing layer.

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

**-WorksheetName String required**

Name of the worksheet containing the chart.

**-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:250BF23B4249185EFFD11C6556138D6F210C3D21AD18040E40882E31CC80B864 -->
