Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 161
Forks 15
PowerShell Gallery downloads 158,661
Release v3.0.7
Language: C# Updated: 2026-09-24

API Reference

Cmdlet

New-OfficeExcelImageOptions

Namespace PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Excel.ExcelImageExportOptions

Creates discoverable rendering settings for Excel range and chart image export.

Remarks

Creates discoverable rendering settings for Excel range and chart image export.

Examples

Authored help example

Render a range with gridlines and hyperlinks visible.

PS>


$options = New-OfficeExcelImageOptions -ShowGridlines -ShowHyperlinkHints -TargetDpi 144
            Export-OfficeExcelRangeImage -Path .\Workbook.xlsx -Worksheet Summary -Range A1:H20 -OutputPath .\Summary.svg -Options $options
        

Reuse the same rendering controls for a chart.

PS>


$options = New-OfficeExcelImageOptions -TargetDpi 144 -MaximumOutputWidth 1600
            Export-OfficeExcelChartImage -Path .\Workbook.xlsx -Worksheet Summary -ChartName Revenue -OutputPath .\Revenue.svg -Options $options
        

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

New-OfficeExcelImageOptions [-BackgroundColor <String>] [-IncludeCharts] [-IncludeConditionalFormatting] [-IncludeDrawingObjects] [-IncludeHidden] [-IncludeImages] [-MaximumDegreeOfParallelism <Int32>] [-MaximumOutputCount <Int32>] [-MaximumOutputHeight <Int32>] [-MaximumOutputWidth <Int32>] [-MaximumRasterPixels <Int64>] [-MaximumRenderedCells <Int32>] [-MaximumTotalEncodedBytes <Int64>] [-MaximumTotalRasterPixels <Int64>] [-RasterOverflowBehavior <ReduceScale|Throw>] [-RenderTimeoutSeconds <Double>] [-Scale <Double>] [-ShowCommentBodies] [-ShowGridlines] [-ShowHyperlinkHints] [-TargetDpi <Double>] [-TextShapingLanguage <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

BackgroundColor String optionalposition: namedpipeline: False
Specifies a value for background color.
IncludeCharts SwitchParameter optionalposition: namedpipeline: False
Include worksheet charts.
IncludeConditionalFormatting SwitchParameter optionalposition: namedpipeline: False
Include conditional formatting.
IncludeDrawingObjects SwitchParameter optionalposition: namedpipeline: False
Include drawing objects.
IncludeHidden SwitchParameter optionalposition: namedpipeline: False
Include hidden rows and columns.
IncludeImages SwitchParameter optionalposition: namedpipeline: False
Include worksheet images.
MaximumDegreeOfParallelism Int32 optionalposition: namedpipeline: False
Specifies a value for maximum degree of parallelism.
MaximumOutputCount Int32 optionalposition: namedpipeline: False
Specifies a value for maximum output count.
MaximumOutputHeight Int32 optionalposition: namedpipeline: False
Specifies a value for maximum output height.
MaximumOutputWidth Int32 optionalposition: namedpipeline: False
Specifies a value for maximum output width.
MaximumRasterPixels Int64 optionalposition: namedpipeline: False
Specifies a value for maximum raster pixels.
MaximumRenderedCells Int32 optionalposition: namedpipeline: False
Maximum cells rendered.
MaximumTotalEncodedBytes Int64 optionalposition: namedpipeline: False
Specifies a value for maximum total encoded bytes.
MaximumTotalRasterPixels Int64 optionalposition: namedpipeline: False
Specifies a value for maximum total raster pixels.
RasterOverflowBehavior OfficeRasterOverflowBehavior optionalposition: namedpipeline: Falsevalues: 2
Specifies a value for raster overflow behavior.
Possible values: ReduceScale, Throw
RenderTimeoutSeconds Double optionalposition: namedpipeline: False
Specifies a value for render timeout seconds.
Scale Double optionalposition: namedpipeline: False
Specifies a value for scale.
ShowCommentBodies SwitchParameter optionalposition: namedpipeline: False
Show cell comment bodies.
ShowGridlines SwitchParameter optionalposition: namedpipeline: False
Show worksheet gridlines.
ShowHyperlinkHints SwitchParameter optionalposition: namedpipeline: False
Show hyperlink hints.
TargetDpi Double optionalposition: namedpipeline: False
Specifies a value for target dpi.
TextShapingLanguage String optionalposition: namedpipeline: False
Specifies a value for text shaping language.

Outputs

OfficeIMO.Excel.ExcelImageExportOptions