CellRangeExtensions.ExportToImage(CellRange, String, ImageFileFormat) Method
In This Article
Exports the cell range to an image in the specified format.
You need a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use this method in production code.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Docs.v24.2.dll
NuGet Package: DevExpress.Document.Processor
#Declaration
public static void ExportToImage(
this CellRange range,
string fileName,
ImageFileFormat format
)
#Parameters
Name | Type | Description |
---|---|---|
range | Cell |
The cell range to be exported to an image. |
file |
String | The file name (including the full path) for the output image. |
format | Image |
The output image format. |
#Exceptions
Type | Description |
---|---|
Invalid |
Occurs when you call this method for a union range that consists of non-adjacent cell ranges. |
#Remarks
The following example demonstrates how to export a cell range to an image:
using DevExpress.Spreadsheet;
// ...
worksheet.Range["B1:I25"].ExportToImage("RangeImage.png", ImageFileFormat.Png);
See Also