获取数据透视表刷新日期和刷新者信息
Contents
[
Hide
]
Aspose.Cells 现在支持从工作簿中获取刷新日期和刷新者信息。
数据透视表.RefreshDate返回上次刷新数据透视表的日期。相似地数据透视表.RefreshByWho属性返回上次刷新报表的用户的名称。以下示例演示了此功能,示例文件可以从以下链接下载。
示例代码
This file contains hidden or 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-.NET | |
// Create workbook object from source excel file | |
Workbook workbook = new Workbook(sourceDir + "sourcePivotTable.xlsx"); | |
// Access first worksheet | |
Worksheet worksheet = workbook.Worksheets[0]; | |
// Access first pivot table inside the worksheet | |
PivotTable pivotTable = worksheet.PivotTables[0]; | |
// Access pivot table refresh by who | |
Console.WriteLine("Pivot table refresh by who = " + pivotTable.RefreshedByWho); | |
// Access pivot table refresh date | |
Console.WriteLine("Pivot table refresh date = " + pivotTable.RefreshDate); |