Free Support Forum - aspose.com

GETPIVOTDATA is not working when using field grouping

I have a pivot table with list grouping:
(4.5 KB)

And a cell pulling data using GETPIVOTDATA
image.png (5.9 KB)

After running the following code:

    Workbook wb = new Workbook("SimplePivot2.xlsx");
    PivotTable pivot = wb.getWorksheets().get("Pivot").getPivotTables().get(0);
    pivot.refreshData();
    pivot.calculateData();
    wb.calculateFormula(new CalculationOptions());
    wb.save("simple_pivot_out.xlsx");

The output excel pivot seems to collapse:
image.png (2.9 KB)

And the cell with GETPIVOTDATA return error #REF

When manually refreshing the pivot in excel, everything gets back to normal.

files.zip (1.5 KB)

@odedha,
We have observed the issue and logged it in our database for further investigation. You will be notified here once any update is ready for sharing.

This issue is logged as:
CELLSJAVA-43383 - GETPIVOTDATA is not working when using field grouping