GetChildren() seems to be broken in some cases

Hello,

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. BigReportWithUserDataAnonyme.zip (164.9 KB)

@gle,
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()

@gle,

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.

@gle,

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?

@gle

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.

We are receiving the same error for one of our Excel files. Can this bugfix be made available prior to v19.4 dropping?

I reproduced it using the GetChildren() call above, but am also receiving the exception during a workbook.RefreshPivotTables() and pivotTable.CalculateData().

@totaldis,
I have tried latest version Aspose.Cells for .NET 19.3.4 with the available sample XLSX file in this thread and observed that issue is resolved for it. You may please send us your sample file for our testing. We will reproduce the scenario and provide feedback afterwards. In case of issue in the API, we will analyze the scenario and provide ETA accordingly as it is not possible to provide any ETA before checking the issue here with your sample file.

@ahsaniqbalsidiqui,

As far as I can tell, .NET 19.3.4 is not yet available as a Nuget package. I’m happy to verify that 19.3.4 fixes our issue as well, but because the slated release is not until the fourth week of April we’re in a failed state. We can’t really send a sample as it contains sensitive material.

@totaldis,

We release the updated version once in a month, therefore you may please wait until this fix is made part of our regular monthly release. This new version will be available via NuGet package manger in the 3rd/4th week of April. Regarding sharing the sample data, you may try to simplify the Excel file or replace the actual data with dummy data and then share it with us for our testing. Other option is that you may send us the actual Excel file in private message by clicking on my name icon and then pressing Message button. In this case the data will not be available publicly and only authorised personnel at Aspose will be able to access it for testing.

The issues you have found earlier (filed as CELLSNET-46645) have been fixed in Aspose.Cells for .NET v19.4. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi