Cmdlet
New-OfficeExcelImageOptions
Creates Excel rendering settings for Export-OfficeDocumentImage and ConvertTo-OfficeDocumentImage.
Syntax
New-OfficeExcelImageOptions
[-ChartFidelity <Strict| BestEffort>]
[-IncludeCharts]
[-IncludeConditionalFormatting]
[-IncludeDrawingObjects]
[-IncludeHidden]
[-IncludeHiddenSheets]
[-IncludeImages]
[-MaximumDegreeOfParallelism <Int32>]
[-MaximumOutputCount <Int32>]
[-MaximumOutputHeight <Int32>]
[-MaximumOutputWidth <Int32>]
[-MaximumRasterPixelCount <Int64>]
[-MaximumRenderedCells <Int32>]
[-MaximumTotalEncodedBytes <Int64>]
[-MaximumTotalRasterPixelCount <Int64>]
[-RasterOverflowBehavior <ReduceScale| Throw>]
[-RenderTimeoutSeconds <Double>]
[-ShowCommentBodies]
[-ShowGridlines]
[-ShowHyperlinkHints]
[-SplitWorksheetsByManualPageBreaks]
[-TextShapingLanguage <String>]
[-UseWorksheetPrintAreas]
[<CommonParameters>]#Parameter set:
DefaultExamples
Render a sheet with gridlines
$image = New-OfficeExcelImageOptions -ShowGridlines
Export-OfficeDocumentImage -Path .\Reports\Q3-Sales.xlsx -Sheet Summary -OutputPath .\Images\Q3-Summary.png -Options $imageRenders the Summary sheet to PNG with gridlines shown.
Render dashboard sheets for a status page
$image = New-OfficeExcelImageOptions -IncludeCharts -IncludeImages -IncludeConditionalFormatting
Export-OfficeDocumentImage -Path .\Reports\Operations.xlsx -Sheet Dashboard -OutputDirectory .\Site\Images -Scale 2 -Options $imageRenders the dashboard at double scale with charts and images, so the PNG stays sharp when embedded in a web page.
Parameters
- -ChartFidelity OfficeChartFidelity
- Chart handling: Strict (default) skips charts with formatting that cannot be drawn exactly; BestEffort draws the closest approximation and reports chart-approximation warnings.
- Possible values:
Strict,BestEffort - -IncludeCharts SwitchParameter
- Includes charts in the rendered output; explicit false omits them.
- -IncludeConditionalFormatting SwitchParameter
- Evaluates supported conditional formatting during rendering; explicit false disables it.
- -IncludeDrawingObjects SwitchParameter
- Includes worksheet drawing objects in the rendered output.
- Renders hidden rows and columns; explicit false omits them.
- Includes hidden worksheets when no explicit sheet selection is supplied.
- -IncludeImages SwitchParameter
- Includes embedded worksheet images in the rendered output.
- -MaximumDegreeOfParallelism Int32
- Maximum concurrent render workers; omission retains the native limit.
- -MaximumOutputCount Int32
- Maximum number of images produced by one batch operation.
- -MaximumOutputHeight Int32
- Maximum output height in pixels.
- -MaximumOutputWidth Int32
- Maximum output width in pixels.
- -MaximumRasterPixelCount Int64
- Maximum pixel count allocated for one raster image.
- -MaximumRenderedCells Int32
- Maximum worksheet cells materialized for one visual snapshot.
- -MaximumTotalEncodedBytes Int64
- Maximum aggregate encoded image bytes in one batch.
- -MaximumTotalRasterPixelCount Int64
- Maximum aggregate raster pixels in one batch.
- -RasterOverflowBehavior OfficeRasterOverflowBehavior
- Native policy when the requested raster exceeds its pixel budget.
- Possible values:
ReduceScale,Throw - -RenderTimeoutSeconds Double
- Render timeout in seconds; omission retains the native timeout.
- -ShowCommentBodies SwitchParameter
- Renders comment text rather than only comment indicators.
- -ShowGridlines SwitchParameter
- Renders worksheet gridlines; explicit false hides them.
- -ShowHyperlinkHints SwitchParameter
- Renders hyperlink hints in worksheet snapshots.
- -SplitWorksheetsByManualPageBreaks SwitchParameter
- Creates separate images at worksheet manual page breaks.
- -TextShapingLanguage String
- Language tag used for native text shaping.
- -UseWorksheetPrintAreas SwitchParameter
- Honor 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.