إظهار خيار صفحات تصفية التقرير
Contents
[
Hide
]
إظهار خيار صفحات تصفية التقرير
يدعم Excel إنشاء جداول محورية وإضافة عوامل تصفية التقرير وتمكين خيار “إظهار صفحات تصفية التقرير”. يدعم Aspose.Cells أيضًا هذه الميزة لتمكين خيار “إظهار صفحات تصفية التقرير” في الجدول المحوري الذي تم إنشاؤه. فيما يلي الشاشة التي تعرض خيار “إظهار صفحات تصفية التقرير” في برنامج Excel.
يمكن تنزيل نموذج ملف المصدر وملفات الإخراج من هنا لاختبار نموذج التعليمات البرمجية:
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 | |
// Load template file | |
Workbook wb = new Workbook(sourceDir + "samplePivotTable.xlsx"); | |
// Get first pivot table in the worksheet | |
PivotTable pt = wb.Worksheets[1].PivotTables[0]; | |
// Set pivot field | |
pt.ShowReportFilterPage(pt.PageFields[0]); | |
// Set position index for showing report filter pages | |
pt.ShowReportFilterPageByIndex(pt.PageFields[0].Position); | |
// Set the page field name | |
pt.ShowReportFilterPageByName(pt.PageFields[0].Name); | |
// Save the output file | |
wb.Save(outputDir + "outputSamplePivotTable.xlsx"); |