We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

SheetRenderer.ToImage not rendering correctly Excel chart


When using SheetRenderer to render an Excel chart to image the resulted image is different than original chart (see the attached images). For reproducing the issue use the attached Excel file and the following code:

var workbook = new Workbook(@“Highlights Charts - Modified.xlsx”);

workbook.Worksheets[0].PageSetup.PrintArea = string.Format("{0}{1}:{2}{3}", “C”, 16, “G”, 31);
workbook.Worksheets[0].PageSetup.TopMargin = 0.1;
workbook.Worksheets[0].PageSetup.LeftMargin = 0.1;
workbook.Worksheets[0].PageSetup.RightMargin = 0.1;
workbook.Worksheets[0].PageSetup.BottomMargin = 0.1;

var imageOptions = new ImageOrPrintOptions
Quality = 100,
VerticalResolution = 200,
HorizontalResolution = 200,
PrintingPage = PrintingPageType.IgnoreBlank,
ImageFormat = ImageFormat.Png,
OnePagePerSheet = true,
OnlyArea = true

var sheetRender = new SheetRender(workbook.Worksheets[0], imageOptions);
var image = sheetRender.ToImage(0);

Aurelian Iordache
Software Developer
IBM Romania

Hi Aurelian,

Thank you for sharing the sample spreadsheet.

We have evaluated your presented scenario against the latest version of Aspose.Cells for .NET and are able to observe the difference in the chart & its image that we saved through your provided code snippet. The problem has been logged in our bug tracking system under the ticket CELLSNET-42893 for further investigation & correction purposes. Please spare us little time to properly analyze the problem cause on our end. In the meanwhile, we will keep you posted with updates in this regard.


Please try our latest version/fix: Aspose.Cells for .NET v8.3.1.4

We have fixed your issue “<span lang=“EN-US” style=“font-size:11.0pt;font-family:
AR-SA”>CELLSNET-42893” now.

Let us know your feedback.

Thank you.

The issues you have found earlier (filed as CELLSNET-42893) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.