ピボットテーブルのリフレッシュ日時とリフレッシュ実行者情報の取得

ピボットテーブルの更新日付と更新者情報を取得する方法

PivotTable.refresh_dateはピボットテーブルレポートが最後に更新された日付を返します。同様に、PivotTable.refreshed_by_whoプロパティはレポートを最後に更新したユーザーの名前を返します。以下の例はこの機能をデモンストレーションし、サンプルファイルは以下のリンクからダウンロードできます。

SourcePivotTable.xlsx

サンプルコード

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))