PivotTable.ShowReportFilterPageByIndex

PivotTable.ShowReportFilterPageByIndex method

Show all the report filter pages according to the position index in the PageFields

public void ShowReportFilterPageByIndex(int posIndex)
ParameterTypeDescription
posIndexInt32The position index in the PageFields

Examples

using System;
using Aspose.Cells;
using Aspose.Cells.Pivot;

namespace AsposeCellsExamples
{
    public class PivotTableMethodShowReportFilterPageByIndexWithInt32Demo
    {
        public static void Run()
        {
            // Create a workbook from source Excel file
            Workbook workbook = new Workbook("PivotTable.xlsx");
            
            // Access the first worksheet which contains the pivot table
            Worksheet worksheet = workbook.Worksheets[0];
            
            // Access the first pivot table
            PivotTable pivotTable = worksheet.PivotTables[0];
            
            // Show report filter pages by index (position) of the page field
            int pageFieldIndex = 0; // First page field
            pivotTable.ShowReportFilterPageByIndex(pageFieldIndex);
            
            // Save the workbook
            workbook.Save("PivotTable_ShowReportFilterPageByIndex_Output.xlsx");
        }
    }
}

See Also