Pie chart not rendering correctly

I am evaluating Excel to Image functionality and having some issues with the way Pie charts render. Attached is a resulting image as well as the original excel.

sample4.png (36.9 KB)
sample4_excel.7z (12.8 KB)

The code:

static void TestAspose()
        var book = new Aspose.Cells.Workbook(@"C:\Projects\WordTest\sample4.xlsx");

        var sheet = book.Worksheets[0];
        sheet.PageSetup.LeftMargin = 0;
        sheet.PageSetup.RightMargin = 0;
        sheet.PageSetup.TopMargin = 0;
        sheet.PageSetup.BottomMargin = 0;
        var options = new Aspose.Cells.Rendering.ImageOrPrintOptions
            OnePagePerSheet = true,
            ImageType = Aspose.Cells.Drawing.ImageType.Emf

        var sr = new Aspose.Cells.Rendering.SheetRender(sheet, options);

        var imgStream = new MemoryStream();
        sr.ToImage(0, @"C:\Projects\WordTest\sample4.emf");


I tested your scenario/case using your sample code and template file. I found only two data labels are different. I could not notice any other significant issue. See the screenshot attached.
sc_shot1.png (132.3 KB)

Could you confirm if these are the only issues you are referring? It would be good if you could provide a screenshot to highlight issues (if there are some other issues as well), so we should not miss any issue and could log appropriate ticket(s) into our database to get these fixed soon.

I am referring to the incorrect rendering of the labels for the pie chart. How it looks like in the excel file I previously attached:
excel.png (20.5 KB)
How it looks like when rendered:
render.png (25.6 KB)

So as you can see there are big differences which make the render not usable.


Which version of the product you are using? Please try latest version (Aspose.Cells for .NET v21.8) and let us know your feedback with rendered image file. Do you get the same output as mine now?

I was already using 21.8.0 when I made this post.
Any other suggestions?

We have observed this issue here and logged it in our database for further investigation. You will be notified here once any update is ready for sharing.

This issue is logged as:
CELLSNETCORE-148 - Pie chart not rendering correctly

Thanks, is this specific to .NET Core? When you ran your initial test did you use the old .NET framework?


Yes, it looks so and we tested it in common .NET framework versions initially. We have also logged a ticket for .NET Core module accordingly but part of the issue will also be fixed for common .NET framework versions.

Thank you, what’s the typical turnaround time for a hotfix for something like this?

This issue is logged too recently and is still in queue for analysis. We will write back here once any ETA is available.

Any idea when this is getting fixed?

We are gathering information in this regard and will share our feedback soon.

Hi @RadAway
We plan to address this issue in the next patch, expected this week.
By the way, to confirm your environment, you are using Aspose Cells for Netstandard, running on windows?

Yes. Our environment is .NET Core 5 on Windows


Thanks for the details. We noted it down.

Hi @RadAway
Please try the fix v21.10.2.

Aspose.Cells21.10.2 For .NetStandard20.Zip (5.6 MB)

Since this is a patched version, you may need to manually reference the following package from nuget:
“System.Drawing.Common, 4.7.0”
“System.Text.Encoding.CodePages, 4.7.0”
Please let us know your feedback. Thank you.

The issues you have found earlier (filed as CELLSNETCORE-148) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao