Free Support Forum -

GetChildren() seems to be broken in some cases



it seems that the GetChildren() method is not fully functional.
In some cases, this method returns an exception:

System.ArgumentOutOfRangeException : Length cannot be less than zero.
Parameter name: length
at System.String.Substring(Int32 startIndex, Int32 length)
at Aspose.Cells.Pivot.PivotTable.\u0002(String \u0002, String& \u0003, Int32& \u0005, Int32& \u0008, 
Int32& \u0006, Int32& \u000e)
at Aspose.Cells.Pivot.PivotTable.GetChildren()

You will find below a basic example of our code and, as an attachment, an excel file which provokes this exception.

var directory = Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().Location);
var path = Path.Combine(directory, @"Aspose\SampleFiles", @"BigReportWithUserDataAnonyme.xlsx");
using (var workbook = new Workbook(path))
	foreach (var worksheet in workbook.Worksheets)
		foreach (var table in worksheet.PivotTables)
			foreach (var childTable in table.GetChildren())

Our version of Aspose.Cells is 18.12.0 but we also tried with the latest version. (164.9 KB)


We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46645 - Exception raised while calling PivotTable.GetChildrens()



This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-46645”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.



Please try our latest version/fix: Aspose.Cells for .NET v19.3.1:

Aspose.Cells19.3.1 For .NetStandard20.Zip (4.0 MB)
Aspose.Cells19.3.1 For .Net2_AuthenticodeSigned.Zip (4.8 MB)
Aspose.Cells19.3.1 For .Net4.0.Zip (4.8 MB)

Your issue should be fixed in it.

Let us know your feedback.


Thank you for the fix.
I confirm that it solve my issue.
Can you give me an estimate of the date of the next release?



You may use this fix as an official release, it includes all the functionality of the previous release v19.3 and the fix (of your issue). It is safe to use it on production server. However, you can expect the next official release of the product, i.e., Aspose.Cells for .NET v19.4 in the third or fourth week of April 2019.

Once the release is published, you will be notified in the thread.