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

Free Support Forum - aspose.com

Sheet to image - Sparklines not displayed properly using C#.NET


When rendering an Excel table with sparklines the resulting image is incorrect.
var wb = new Workbook(“test.xlsx”);

Worksheet sheet = wb.Worksheets.First();

var options = new ImageOrPrintOptions


ImageFormat = ImageFormat.Emf,

ChartImageType = ImageFormat.Emf,

OnlyArea = false,

TextRenderingHint = TextRenderingHint.ClearTypeGridFit,

OnePagePerSheet = true


var sheetRenderer = new SheetRender(sheet, options);

sheetRenderer.ToImage(0, “out.emf”);


Thanks for the template file and sample code.

After an initial test, I am able to observe the issue as you mentioned by using your sample code with your template file. I found that sparklines (in the worksheet) are not displayed properly when the worksheet is rendered as image, see the screenshot for your reference:

I have logged a ticket with an id “CELLSNET-45400” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

Thank you.

Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issue CELLSNET-45400 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

The issues you have found earlier (filed as CELLSNET-45400) have been fixed in Aspose.Cells for .NET 17.6.

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


This certainly looks better but the lines are still very jagged.
Here is a docx that compares Aspose with the Office equivalent:

Test.zip (28.0 KB)

Could the lines be smoother?


Thanks for your feedback and using Aspose APIs.

We were able to observe this issue and logged it in our database for investigation and for a fix.

This issue has been logged as

  • CELLSNET-45547 - Sparklines are not smoother in the output EMF image

Sample Test Excel File.zip (8.2 KB)


Please try setting the options to anti-alias and it should fix your issue. Sample code is given below.


ImageOrPrintOptions op = new ImageOrPrintOptions();
op.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;

The issues you have found earlier (filed as CELLSNET-45547) have been fixed in Aspose.Cells for .NET v17.8.