Click or drag to resize

XlsWorksheet SaveToImage Method

Overload List
Name Description
Public method SaveToImage(String)
Save worksheet to image.
Public method SaveToImage(String, ImageFormat)
Save worksheet to image.
Public method SaveToImage(Int32, Int32, Int32, Int32) Obsolete.
Save worksheet to image.
Public method SaveToImage(String, Int32, Int32, Int32, Int32)
Save worksheet to image.
Public method Code example SaveToImage(Stream, Int32, Int32, Int32, Int32, ImageType)
Save worksheet 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) Obsolete.
Converts range into image.
Public method SaveToImage(Stream, Int32, Int32, Int32, Int32, ImageType, EmfType) Obsolete.
Converts range into image.
Top
See Also