Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IWorksheet Interface > ConvertToImage Method : ConvertToImage(Int32,Int32,Int32,Int32) Method
First row index. One-based.
First column index. One-based.
Last row index. One-based.
Last column index. One-based.

ConvertToImage(Int32,Int32,Int32,Int32) Method

Converts the specified range into image. Default image type is Bitmap.
Syntax
'Declaration
 
Overloads Function ConvertToImage( _
   ByVal firstRow As Integer, _
   ByVal firstColumn As Integer, _
   ByVal lastRow As Integer, _
   ByVal lastColumn As Integer _
) As Image
'Usage
 
Dim instance As IWorksheet
Dim firstRow As Integer
Dim firstColumn As Integer
Dim lastRow As Integer
Dim lastColumn As Integer
Dim value As Image
 
value = instance.ConvertToImage(firstRow, firstColumn, lastRow, lastColumn)

Parameters

firstRow
First row index. One-based.
firstColumn
First column index. One-based.
lastRow
Last row index. One-based.
lastColumn
Last column index. One-based.

Return Value

Converted Image for the specified range.
Remarks
Subscript/Superscript,RTF,Shrink to fit,Shapes (except TextBox shape and Image),Charts and Chart Worksheet and Complex conditional formatting features are not supported in Worksheet to image conversion. Gradient fill is partially supported This method is supported on Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms only.
Example
// Converts the Range(R1C1 to R10C20) in worksheet to image.
Image img = sheet.ConvertToImage(1, 1, 10, 20);
img.Save("Sample.png", ImageFormat.Png);
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also