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

Free Support Forum - aspose.com

Issue with Chart ToImage method


We’re evaluating Aspose.Cells component for .Net and were attempting to extract charts from existing excel document to emf pictures.

We have an issue with this problem because there are visible differences between how those charts look in excel (we’re testing with excel 2007), and how do those extracted emf files look like.

Can you tell is it something to be expected (if so do you have any plans on improving this functionality that way), or are we doing something wrong and we can get some better results (we have requirement for those emf files to be practically identical as charts in excel).

I’m attaching excel spreadsheet and emf files i extracted using your library.
Differences are such as:
- In 1st chart visibility of lines and information on legend
- On 2nd chart style of dashed line
- On 3rd chart line overlapping is also different, different range of displayed data, and chart areas are moved slightly to right

Code i’m using to get those charts is:

public void GetPictureFromXls(byte[] xls) // byte array with excel spreadsheet
Aspose.Cells.License license = new Aspose.Cells.License();


Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook();
MemoryStream readStr = new MemoryStream(xls);

for (int i = 0; i < wb.Worksheets[0].Charts.Count; i++ )
wb.Worksheets[0].Charts[i].ToImage(“c:\share\ChartReturns\chart.xlsx” + i + “.emf”, System.Drawing.Imaging.ImageFormat.Emf);


Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

We have found your mentioned issue after an initial test. We will look into it and get back to you soon. Your issue has been registered in our internal issue tracking system with issue id CELLSNET-13526.

Thank you & Best Regards,


After analyzing your issue, I am afraid we cannot support converting charts of 2007 excel file to image files at the moment and only simple charts are supported now. We have no plan to develop the feature but hopefully will start to implement it in Q3 or Q4 of this year. Now you can convert your 2007 files to 2003 files and then generate image from 2003 file formats, it will work fine.

Thanks for your understanding!

Hi Leszek,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please try the attached latest version of Aspose.Cells. We have fixed your mentioned issue. 

Also, we have started to develop converting Chart2Image feature for MS Excel 2007 and it’s scheduled to finish in August.

Thank You & Best Regards,

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

This message was posted using Notification2Forum from Downloads module by aspose.notifier.