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

Free Support Forum - aspose.com

Index out of range exception when calling chart.ToImage()

Hi all

I am trying to get a Bitmap from an Excel chart of type XY (Scatter) for adding it to a Word document. Unfortunately, an exception gets thrown when calling chart.ToImage().

The exact error message is:

"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"

Is this chart type not supported for this function or could there be any other issues I have to take care about?

This functionality is critical for the project I am currently working on, so I hope there is a solution.




Could you post your template file (containing the chart) here, we will check your issue soon.

Thank you.


The corresponding Excel document is attached.

There are 3 charts in total.

Chart named PayOffChartTest (on top right side) is working alright. It is a line chart and has just been added for testing purposes.

The chart I tried to render an image of is the chart named PayOffChartEN (on top left side).

Thanks for your help,


Hi Roger,

Please try this fix. We have fixed the bug of reading chart and charts2image.

Hi Simon

It is working now.


I will recommend your products and good service.



Dear Roger,

I'm the Team Leader of Aspose Service Team and I'm glad to see that you like our products. I would greatly appreciate if you can share your thoughts with us in the form of a Case Study so that we can share it with our other customers too.

You can download our Case Study Template using this URL: http://www.aspose.com/community/files/120280/case-study-template/download.doc

If you want to see some existing case studies as an example, please check these links:




You can find more case studies from our downloads section: http://www.aspose.com/community/files/default.aspx

I thank you in advance for your trust in Aspose and being the part of Aspose Family.

Please feel free to contact me, if i can be of any help.

Have a good time.