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?
Please try the latest version:
Aspose.Cells for .NET v188.8.131.52
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;
string str = “Item”;
if (cntTry > 0) str = “[” + cntTry.ToString() + "] " + str;
printLine(str, pf.Items[j], SPACE4);
if ((cntTry > 1000) || (!tryReloadItems))
printLine(“Item”, " ============== ERROR ============== ", SPACE4);
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.
With new version all works fine!