Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Export-OfficeExcelImage

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

Exports workbook sheets as PNG or SVG images with one result per sheet.

Syntax

Export-OfficeExcelImage [-Format <OfficeImageExportFormat>] [-Options <ExcelWorkbookImageExportOptions>] [-OutputPath] <String> [-PassThru] [-Path] <String> [<CommonParameters>]
#
Parameter set: Path
Export-OfficeExcelImage -Document <ExcelDocument> [-Format <OfficeImageExportFormat>] [-Options <ExcelWorkbookImageExportOptions>] [-OutputPath] <String> [-PassThru] [<CommonParameters>]
#
Parameter set: Document

Examples

Authored help example

Export visible sheets as PNG files.

Export-OfficeExcelImage -Path .\Report.xlsx -OutputPath .\Images

Writes one image per selected sheet. Add -PassThru to receive the structured export results.

Parameters

-Format OfficeImageExportFormat optional
Output image format.
Possible values: Png, Svg, Jpeg, Tiff, Webp, Bmp, Pbm, Tga, Icon
-Options ExcelWorkbookImageExportOptions optional
Optional sheet selection, range, size, and rendering settings.
-OutputPath String requiredposition: 1
Destination folder.
-PassThru SwitchParameter optional
Emit one structured image export result per saved sheet.
-Path String requiredposition: 0sets: Path
Path to the workbook.
-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.