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

Free Support Forum - aspose.com

Problem with reading existing chart in XLS file


I’ve tried to access previously created chart (by Excell) in XLS workbook, but failed.

Here is the code (pretty simple)

Workbook _wb = new Workbook();
Chart _shape = _wb.Worksheets[0].Charts[0]; <-- breaks here and Charts.Count == 0

Could you please advise?


Hi Peter,

Please use Workbook.Open() method instead of LoadData(). The LoadData() method only loads data and formulas etc.


Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook();


Aspose.Cells.Chart chart = workbook.Worksheets[0].Charts[0];




I tried the above code and it works fine.

Thank you.

Thaks a lot Amjad, I haven’t realized that there are several ways to load XLS, shame on me.