API Reference

Cmdlet

Export-OfficeExcelChartImage

Namespace PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
OfficeIMO.Drawing.OfficeImageExportResult

Exports one named worksheet chart as an image file.

Remarks

Exports one named worksheet chart as an image file.

Examples

Authored help example

Export a chart for inline use in an email.

PS>


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

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.

Syntax

Export-OfficeExcelChartImage -ChartName <String> [-Force] [-Format <Png|Svg|Jpeg|Tiff|Webp>] [-Options <ExcelImageExportOptions>] [-OutputPath <String>] -Path <String> -WorksheetName <String> [<CommonParameters>]
#
Parameter set: Path

Parameters

ChartName String requiredposition: namedpipeline: False
Chart name as stored in the worksheet drawing layer.
Force SwitchParameter optionalposition: namedpipeline: False
Replace an existing destination file.
Format OfficeImageExportFormat optionalposition: namedpipeline: Falsevalues: 5
Output image format.
Possible values: Png, Svg, Jpeg, Tiff, Webp
Options ExcelImageExportOptions optionalposition: namedpipeline: False
Optional rendering, size, font, and diagnostic policy settings.
OutputPath String optionalposition: 1pipeline: False
Optional destination image file. When omitted, returns the in-memory image result only.
Path String requiredposition: 0pipeline: False
Path to the workbook.
WorksheetName String requiredposition: namedpipeline: False
Name of the worksheet containing the chart.

Outputs

OfficeIMO.Drawing.OfficeImageExportResult

Export-OfficeExcelChartImage -ChartName <String> -Document <ExcelDocument> [-Force] [-Format <Png|Svg|Jpeg|Tiff|Webp>] [-Options <ExcelImageExportOptions>] [-OutputPath <String>] -WorksheetName <String> [<CommonParameters>]
#
Parameter set: Document

Parameters

ChartName String requiredposition: namedpipeline: False
Chart name as stored in the worksheet drawing layer.
Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Open workbook instance.
Force SwitchParameter optionalposition: namedpipeline: False
Replace an existing destination file.
Format OfficeImageExportFormat optionalposition: namedpipeline: Falsevalues: 5
Output image format.
Possible values: Png, Svg, Jpeg, Tiff, Webp
Options ExcelImageExportOptions optionalposition: namedpipeline: False
Optional rendering, size, font, and diagnostic policy settings.
OutputPath String optionalposition: 1pipeline: False
Optional destination image file. When omitted, returns the in-memory image result only.
WorksheetName String requiredposition: namedpipeline: False
Name of the worksheet containing the chart.

Outputs

OfficeIMO.Drawing.OfficeImageExportResult