Class WorksheetImageExporter
Extension methods for exporting a Worksheet or cell range to a raster image.
Inherited Members
Namespace: DRIT.Spreadsheet.Export.Image
Assembly: DRIT.Spreadsheet.dll
Syntax
public static class WorksheetImageExporter
Methods
ExportRangeToEmf(Worksheet, string, string, RangeImageSaveOptions?)
Exports the specified cell range to an Enhanced Metafile (EMF). Worksheet shapes anchored in the range are rendered by the shared vector drawing pipeline.
Declaration
public static void ExportRangeToEmf(this Worksheet worksheet, string range, string path, RangeImageSaveOptions? options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Worksheet | worksheet | The worksheet containing the range. |
| string | range | The cell range to export (e.g. |
| string | path | The output EMF file path. |
| RangeImageSaveOptions | options | Image options controlling resolution and rendering. |
ExportRangeToImage(Worksheet, string, RangeImageSaveOptions?)
Exports the specified cell range to a DRIT.Drawing.Imaging.Bitmap.
The caller is responsible for disposing the returned bitmap.
Declaration
public static Bitmap ExportRangeToImage(this Worksheet worksheet, string range, RangeImageSaveOptions? options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Worksheet | worksheet | |
| string | range | |
| RangeImageSaveOptions | options |
Returns
| Type | Description |
|---|---|
| Bitmap |
ExportRangeToImage(Worksheet, string, string, RangeImageSaveOptions?)
Exports the specified cell range to an image file.
Declaration
public static void ExportRangeToImage(this Worksheet worksheet, string range, string path, RangeImageSaveOptions? options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Worksheet | worksheet | The worksheet containing the range. |
| string | range | The cell range to export (e.g. |
| string | path | The output file path. The extension is set from
|
| RangeImageSaveOptions | options | Export options, or null for defaults. |
ExportToImage(Worksheet, RangeImageSaveOptions?)
Exports the used range of the worksheet to a DRIT.Drawing.Imaging.Bitmap.
The caller is responsible for disposing the returned bitmap.
Declaration
public static Bitmap ExportToImage(this Worksheet worksheet, RangeImageSaveOptions? options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Worksheet | worksheet | |
| RangeImageSaveOptions | options |
Returns
| Type | Description |
|---|---|
| Bitmap |
ExportToImage(Worksheet, string, RangeImageSaveOptions?)
Exports the used range of the worksheet to an image file.
Declaration
public static void ExportToImage(this Worksheet worksheet, string path, RangeImageSaveOptions? options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Worksheet | worksheet | The worksheet to export. |
| string | path | The output file path. |
| RangeImageSaveOptions | options | Export options, or null for defaults. |