// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java //Create load options LoadOptions options = new LoadOptions(); //Set ParsingPivotCachedRecords true, default value is false options.setParsingPivotCachedRecords(true); //Load the sample Excel file containing pivot table cached records Workbook wb = new Workbook("sampleParsingPivotCachedRecordsWhileLoadingExcelFile.xlsx", options); //Access first worksheet Worksheet ws = wb.getWorksheets().get(0); //Access first pivot table PivotTable pt = ws.getPivotTables().get(0); //Set refresh data flag true pt.setRefreshDataFlag(true); //Refresh and calculate pivot table pt.refreshData(); pt.calculateData(); //Set refresh data flag false pt.setRefreshDataFlag(false); //Save the output Excel file wb.save("outputParsingPivotCachedRecordsWhileLoadingExcelFile.xlsx");