Interface IXlsIORenderer
Represents XlsIORender used for conversions
Namespace: Syncfusion.XlsIO
Assembly: Syncfusion.XlsIO.NET.dll
Syntax
public interface IXlsIORenderer
Properties
ChartRenderingOptions
Gets or sets the Chart to Image options. Default image format is JPEG and scaling mode is Best.
Declaration
ExportImageOptions ChartRenderingOptions { get; }
Property Value
Type |
---|
ExportImageOptions |
Methods
ConvertToImage(IChart, Stream)
Converts the specified chart into image.
Declaration
void ConvertToImage(IChart chart, Stream outputStream)
Parameters
Type | Name | Description |
---|---|---|
IChart | chart | The chart which is to be converted to image. |
System.IO.Stream | outputStream | Stream to hold the converted image data. |
Remarks
This method is supported in NetStandard supported platforms only.
Examples
// Specify the image options to be used on chart to image conversion
renderer.ChartRenderingOptions.ImageFormat = ExportImageFormat.Png;
// Converts the chart to image.
Stream image = new FileStream("Sample.png", FileMode.Create, FileAccess.ReadWrite);
renderer.ConvertToImage(chart, image);
ConvertToImage(IRange, ExportImageOptions, Stream)
Converts the specified range into image with the image settings given.
Declaration
void ConvertToImage(IRange range, ExportImageOptions imageOptions, Stream outputStream)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | The range which is to be converted to image. |
ExportImageOptions | imageOptions | object that defines Image quality and image format to be used for conversion. |
System.IO.Stream | outputStream | Stream to hold the converted image data. |
Remarks
Subscript/Superscript,Shrink to fit,Shapes (except TextBox shape and Image) and Complex conditional formatting features are not supported in Worksheet to image conversion. Gradient fill is partially supported
Examples
// Converts the Range used in worksheet to image.
Stream image = new FileStream("Sample.png", FileMode.Create, FileAccess.ReadWrite);
ExportImageOptions imageOptions = new ExportImageOptions();
imageOptions.ImageFormat = ExportImageFormat.Jpeg;
sheet.ConvertToImage(sheet.UsedRange, imageOptions, image);
ConvertToImage(IRange, Stream)
Converts the specified range into image with default image settings.
Declaration
void ConvertToImage(IRange range, Stream outputStream)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | The range which is to be converted to image. |
System.IO.Stream | outputStream | Stream to hold the converted image data. |
Remarks
Subscript/Superscript,Shrink to fit,Shapes (except TextBox shape and Image) and Complex conditional formatting features are not supported in Worksheet to image conversion. Gradient fill is partially supported
Examples
// Converts the Range used in worksheet to image.
Stream image = new FileStream("Sample.png", FileMode.Create, FileAccess.ReadWrite);
sheet.ConvertToImage(sheet.UsedRange, imageOptions, image);
ConvertToImage(IWorksheet, Int32, Int32, Int32, Int32, ExportImageOptions, Stream)
Converts the specified range into image with the image options given. Default image format is PNG.
Declaration
void ConvertToImage(IWorksheet worksheet, int firstRow, int firstColumn, int lastRow, int lastColumn, ExportImageOptions imageOptions, Stream outputStream)
Parameters
Type | Name | Description |
---|---|---|
IWorksheet | worksheet | |
System.Int32 | firstRow | First row index. One-based. |
System.Int32 | firstColumn | First column index. One-based. |
System.Int32 | lastRow | Last row index. One-based. |
System.Int32 | lastColumn | Last column index. One-based. |
ExportImageOptions | imageOptions | object that defines Image quality and image format to be used for conversion. |
System.IO.Stream | outputStream | Stream to hold the converted image data. |
Remarks
Subscript/Superscript,Shrink to fit,Shapes (except TextBox shape and Image) and Complex conditional formatting features are not supported in Worksheet to image conversion. Gradient fill is partially supported
Examples
// Converts the Range(R1C1 to R10C20) in worksheet to image.
Stream image = new FileStream("Sample.png", FileMode.Create, FileAccess.ReadWrite);
ExportImageOptions imageOptions = new ExportImageOptions();
imageOptions.ImageFormat = ExportImageFormat.Jpeg;
Image img = sheet.ConvertToImage(1, 1, 10, 20, imageOptions, image);
ConvertToImage(IWorksheet, Int32, Int32, Int32, Int32, Stream)
Converts the specified range into image. Default image format is PNG.
Declaration
void ConvertToImage(IWorksheet worksheet, int firstRow, int firstColumn, int lastRow, int lastColum, Stream outputStream)
Parameters
Type | Name | Description |
---|---|---|
IWorksheet | worksheet | |
System.Int32 | firstRow | First row index. One-based. |
System.Int32 | firstColumn | First column index. One-based. |
System.Int32 | lastRow | Last row index. One-based. |
System.Int32 | lastColum | |
System.IO.Stream | outputStream | Stream to hold the converted image data. |
Remarks
Subscript/Superscript,Shrink to fit,Shapes (except TextBox shape and Image) and Complex conditional formatting features are not supported in Worksheet to image conversion. Gradient fill is partially supported
Examples
// Converts the Range(R1C1 to R10C20) in worksheet to image.
Stream image = new FileStream("Sample.png", FileMode.Create, FileAccess.ReadWrite);
Image img = sheet.ConvertToImage(1, 1, 10, 20, image);