Hi!
Rows and columns in my pivot table have subtotals. When I try to load the first item data from these Base fields it’s raises an exception ‘ArgumentOutOfRangeException’. After several attempts of reading hereof field (the same as count of subtotals), I can read data from it. This problem occurs in *.xlsx files.
In *.xls files I have no such problem, but collections of items in Base fields with subtotals different from collections in *.xlsx file. Base fields in *.xlsx file have ‘Grand Total’ items.
Could you please fix it?
Best regards,
Alex Shloma
Hi,
Please try the latest version:
Aspose.Cells for .NET v7.0.3.1
If the problem persists then please provide a sample code replicating this problem. We will look into it and fix it and update you asap.
I have the same result with latest version.
I created simple Excel file with pivot table. Try to read items from Base fields ‘Region’ and ‘Product’.
PivotFieldCollection pfc = pt.BaseFields;
bool tryReloadItems = true;
for (int i = 0; i < pfc.Count; i++)
{
PivotField pf = pfc[i];
printLine(“ItemCount”, pf.ItemCount.ToString(), SPACE4); // my inner printing method
for (int j = 0; j < pf.ItemCount; j++)
{
int cntTry = 0;
while (true)
try
{
string str = “Item”;
if (cntTry > 0) str = “[” + cntTry.ToString() + "] " + str;
printLine(str, pf.Items[j], SPACE4);
break;
}
catch
{
if ((cntTry > 1000) || (!tryReloadItems))
{
printLine(“Item”, " ============== ERROR ============== ", SPACE4);
break;
}
cntTry++;
}
}
}
Thank you,
Alex Shloma
Hi,
Thanks for your code example and testing it with the latest version.
We have logged this issue in our database. Once the issue is fixed or we get some update relating to it, we will let you know asap.
This issue has been logged as CELLSNET-40105.
Thank you!
With new version all works fine!
Best regards,
Alex Shloma
The issues you have found earlier (filed as CELLSNET-40105) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.