Get Pivot Table refresh date and refresh by who information
Contents
[
Hide
]
Aspose.Cells for Python via .NET now supports fetching the refresh date and refresh by who information from a workbook.
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.
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
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)) |