Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

New-OfficeExcelWorkbookImageOptions

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Excel.ExcelWorkbookImageExportOptions

Creates discoverable sheet selection and rendering settings for Export-OfficeExcelImage.

Syntax

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

Examples

Render selected worksheets with charts and conditional formatting.

$options = New-OfficeExcelWorkbookImageOptions -SheetName Summary,Data -IncludeCharts -IncludeConditionalFormatting
Export-OfficeExcelImage -Path .\Workbook.xlsx -OutputPath .\Sheets -Options $options

Parameters

-BackgroundColor String optional
Background color name or hex value.
-IncludeCharts SwitchParameter optional
Include worksheet charts.
-IncludeConditionalFormatting SwitchParameter optional
Include conditional formatting.
-IncludeDrawingObjects SwitchParameter optional
Include drawing objects.
-IncludeHidden SwitchParameter optional
Include hidden rows and columns.
-IncludeHiddenSheets SwitchParameter optional
Include hidden worksheets.
-IncludeImages SwitchParameter optional
Include worksheet images.
-MaximumDegreeOfParallelism Int32 optional
Maximum independent renders processed concurrently.
-MaximumOutputCount Int32 optional
Maximum images accepted from one batch export.
-MaximumOutputHeight Int32 optional
Maximum output height in pixels.
-MaximumOutputWidth Int32 optional
Maximum output width in pixels.
-MaximumRasterPixels Int64 optional
Maximum pixels allocated for one raster image.
-MaximumRenderedCells Int32 optional
Maximum cells rendered per worksheet.
-MaximumTotalEncodedBytes Int64 optional
Maximum aggregate encoded bytes accepted from one batch.
-MaximumTotalRasterPixels Int64 optional
Maximum aggregate raster pixels accepted from one batch.
-RasterOverflowBehavior OfficeRasterOverflowBehavior optional
Reduce or reject oversized raster output.
Possible values: ReduceScale, Throw
-RenderTimeoutSeconds Double optional
Maximum seconds allowed for one render.
-Scale Double optional
Output scale multiplier.
-SheetName String[] optional
Worksheet names to export.
-ShowGridlines SwitchParameter optional
Show worksheet gridlines.
-SplitWorksheetsByManualPageBreaks SwitchParameter optional
Split worksheets at manual page breaks.
-TargetDpi Double optional
Target output density in dots per inch.
-TextShapingLanguage String optional
BCP 47 language hint for text shaping.
-UseWorksheetPrintAreas SwitchParameter optional
Use worksheet print areas.

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.