获取数据透视表刷新日期和刷新者信息
Contents
[
Hide
]
Aspose.Cells为Python via .NET现在支持从工作簿中获取刷新日期和刷新人信息。
如何获取数据透视表的刷新日期和刷新人信息
PivotTable.refresh_date返回上次刷新数据透视表报告的日期。类似地,PivotTable.refreshed_by_who属性返回上次刷新报告的用户姓名。以下示例演示此功能,示例文件可从以下链接下载。
示例代码
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)) |