Click or drag to resize

IWorksheet SaveToImage Method

Overload List
Name Description
Public method SaveToImage(Int32, Int32, Int32, Int32)
Converts range into image (Bitmap).
Public method Code example SaveToImage(Stream, Int32, Int32, Int32, Int32, ImageType)
Converts range into image.
Examples
The following code illustrates how to convert the specified range into image with the specified type:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Creat stream</para><para>Stream stream = new MemoryStream();</para><para>//Save to image</para><para>System.Drawing.Image image = worksheet.SaveToImage(stream,1, 1, 10, 20, Spire.Xls.ImageType.Bitmap);</para><para>image.Save("Sample.png", System.Drawing.Imaging.ImageFormat.Png);</para>
Public method SaveToImage(Stream, Int32, Int32, Int32, Int32, EmfType)
Converts range into metafile image.
Public method SaveToImage(Stream, Int32, Int32, Int32, Int32, ImageType, EmfType)
Converts range into image.
Top
See Also