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

Free Support Forum - aspose.com

Chart.toImage - Error thrown when title has a line feed in it

The following error is thrown in the toImage(…) call when the title has one or more line feeds (\n) in it. We have a requirement to show the title text on multiple lines. This is how MS Excel works and how your written workbook looks. I’ve attached the workbook written by your save to Excel 97 format. You can see the chart has the title on 3 separate lines.

Thanks in advance,

java.lang.IllegalArgumentException: Invalid substring range
at java.text.AttributedString.(AttributedString.java:237)
at java.text.AttributedString.(AttributedString.java:199)
at com.aspose.a.i.b(Unknown Source)
at com.aspose.a.h.b(Unknown Source)
at com.aspose.a.h.a(Unknown Source)
at com.aspose.a.h.c(Unknown Source)
at com.aspose.a.h.a(Unknown Source)
at com.aspose.a.c.a.a(Unknown Source)
at com.aspose.cells.Chart.toImage(Unknown Source)


After an initial test using your template file, I can find the issue you have mentioned. We will figure it out soon.

I have logged your issue into our issue tracking system with an issue id: CELLSJAVA-17431.

Thank you.


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

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

Thank You & Best Regards,

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

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