Get Pivot Table refresh date and refresh by who information

How to Get Pivot Table Refresh Date and Refresh by Who information

PivotTable.refresh_date returns the date on which the PivotTable report was last refreshed. Similarly PivotTable.refreshed_by_who 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.

SourcePivotTable.xlsx

Sample Code

from aspose.cells import Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# Create workbook object from source excel file
workbook = Workbook(sourceDir + "sourcePivotTable.xlsx")
# Access first worksheet
worksheet = workbook.worksheets[0]
# Access first pivot table inside the worksheet
pivotTable = worksheet.pivot_tables[0]
# Access pivot table refresh by who
print("Pivot table refresh by who = " + pivotTable.refreshed_by_who)
# Access pivot table refresh date
print("Pivot table refresh date = " + str(pivotTable.refresh_date))