Get Pivot Table refresh date and refresh by who information
Contents
[
Hide
]
Aspose.Cells now supports fetching the refresh date and refresh by who information from a workbook.
PivotTable.getRefreshDate returns the date on which the PivotTable report was last refreshed. Similarly PivotTable.getRefreshByWho property returns the name of the user who refreshed the report last time. Following example demonstrates this feature and sample file can be downloaded from the following link.
Sample Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// Instantiating a Workbook object | |
Workbook workbook = new Workbook(srcDir + "sourcePivotTable.xlsx"); | |
// Access first worksheet | |
Worksheet worksheet = workbook.getWorksheets().get(0); | |
// Access first pivot table inside the worksheet | |
PivotTable pivotTable = worksheet.getPivotTables().get(0); | |
// Access pivot table refresh by who property | |
System.out.println("Pivot table refresh by who = " + pivotTable.getRefreshedByWho()); | |
// Access pivot table refresh date | |
System.out.println("Pivot table refresh date = " + pivotTable.getRefreshDate()); |