Opzione Mostra pagine filtro report
Contents
[
Hide
]
Opzione Mostra pagine filtro report
Excel supporta la creazione di tabelle pivot, l’aggiunta di filtri di report e abilita l’opzione “Mostra pagine filtro report”. Aspose.Cells supporta anche questa funzione per abilitare l’opzione “Mostra pagine filtro report” sulla tabella pivot creata. Di seguito è riportata la schermata che mostra l’opzione “Mostra pagine filtro report” in Excel.
Il file sorgente di esempio e i file di output possono essere scaricati da qui per testare il codice di esempio:
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"); |