Hello,
The following stack trace is encountered when attempting to save an image of the chart in this workbook. Note that if you choose Select Data on the chart in Excel and review the Horizontal axis, not all of the items on the horizontal axis are included (some are excluded). If the excluded rows are deleted then the code below works as expected.
Failing Chart.zip (40.6 KB)
Code to reproduce:
[Test]
public void foo47()
{
(new Workbook(@"Failing Chart.xlsx")).Worksheets["Display"].Charts["Chart 1"].ToImage(@"c:\Data\temp\out.png");
}
System.ArgumentOutOfRangeException : Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.ArrayList.get_Item(Int32 index)
at \u0003\u0017\u0015\u0017.\u0002(ArrayList \u0002, \u000f\u001b\u001a\u0017 \u0008)
at \u000e\u0015\u001a\u0017.\u0002(\u0002\u0002\u001a\u0017 \u0002, \u0005\u0019\u000f\u0017 \u0008)
at \u000e\u0015\u001a\u0017.\u0002(\u0002\u0002\u001a\u0017 \u0002)
at \u0002\u0002\u001a\u0017.\u0006\u0016\u001a\u0017\u0003\u0016\u0008()
at \u0002\u001a\u0016\u0017.\u000f\u0015\u0016\u0017\u0003\u0016\u000e()
at \u0002\u001a\u0016\u0017.\u0002()
at \u0002\u001a\u0016\u0017.\u000e\u0015\u0016\u0017\u0003\u0016\u0002\u000f()
at \u0002\u001a\u0016\u0017.\u0008()
at \u0002\u001a\u0016\u0017.\u000e\u0015\u0016\u0017\u0003\u0016\u0005()
at \u000e\u0010\u001a\u0017.\u0002(Stream \u0002, Chart \u0008)
at Aspose.Cells.Charts.Chart.ToImage(Stream stream, ImageOrPrintOptions options)
at Aspose.Cells.Charts.Chart.ToImage(String imageFile, ImageOrPrintOptions options)
at Aspose.Cells.Charts.Chart.ToImage(String imageFile)
at QueBIT.ReportWORQ.UnitTestsV5.Sandbox.ADW.foo47() in C:\Users\AndyWeiss\repos\ReportWORQ\QueBIT.ReportWORQ.UnitTestsV5\Sandbox\ADW.cs:line 67
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Thank you,
-Andy