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.

Cheers,

Roger

Hi,

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

Thank you.

Hi

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,

Roger

Hi Roger,

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

Hi Simon

It is working now.

THANK YOU VERY MUCH!

I will recommend your products and good service.

Cheers,

Roger

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:
http://www.aspose.com/community/files/140473/ubisoft-human-resource-hr-applications/download.pdf

http://www.aspose.com/community/files/122406/partners.worldmap.org-case-study/download.pdf

http://www.aspose.com/community/files/118261/ohal-uses-aspose.cells-in-report-canvas-component/download.pdf

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.