レポート フィルター ページの表示オプション
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"); |