Skip to main content
All docs
V23.2
Row

RangeImageOptions Class

Contains options used to export a cell range to an image.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v23.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

public class RangeImageOptions

Remarks

Use the CellRangeExtensions.ExportToImage extension method of a CellRange object to save a cell range as an image. Create a RangeImageOptions instance and pass it to this method to specify export options.

Important

The CellRangeExtensions class is defined in the DevExpress.Docs.v23.2.dll assembly. You need a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use this assembly in production code.

The following example demonstrates how to export a cell range to an image:

Spreadsheet - Export a Cell Range to an Image and Set Export Options

using DevExpress.Spreadsheet;
using System.Drawing;
// ...

var exportOptions = new RangeImageOptions
{
    Resolution = 192,
    ExportHeadings = true,
    ExportGridlines = true,
    GridlineColor = Color.Gray,
    BackgroundColor = Color.FromArgb(0xF2, 0xF2, 0xF2)
};
worksheet.Range["B1:I25"].ExportToImage("RangeImage.png", ImageFileFormat.Png, exportOptions);

Inheritance

Object
RangeImageOptions
See Also