We are trying to get the image of a chart using the code below:
var workbook = new Workbook(“test.xlsx”);
var worksheet = workbook.Worksheets;
var chart = worksheet.Charts.Cast().Single();
var image = chart.ToImage(CreateImageOptions());
The exception message we get is “Some chart types cannot be combined with other types!”.
I’ve attached the file containing the chart.
The Aspose.Cells version we’re using is 220.127.116.11
Thanks for your posting and using Aspose.Cells for .NET.
We were able to replicate this exception using the latest version: Aspose.Cells
for .NET v18.104.22.168 with the following code. We have logged this issue in our database. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSNET-42267.
Workbook workbook = new Workbook(path);
Worksheet worksheet = workbook.Worksheets;
Chart ch = worksheet.Charts;
Bitmap bmpChart = ch.ToImage();
bmpChart.Save(path + “.out.png”, ImageFormat.Png);
An unhandled exception of type ‘System.ArgumentException’ occurred in AsposeProject.exe
Additional information: Some chart types cannot be combined with other types!
Thanks for using Aspose.Cells for .NET.
Please download and try this fix: Aspose.Cells for .NET v22.214.171.124 and let us know your feedback.
The issues you have found earlier (filed as CELLSNET-42267) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
We’ve tested against Aspose.Cells version 126.96.36.199 and it seems the issue is fixed.
Thanks for your feedback and using Aspose.Cells.
It is good to know that your issue is resolved with the latest version. Let us know if you face any other issue. We will be glad to look into it and help you further.