Impostazione opzione tabella pivot - Per vuoto Cells Mostra
Contents
[
Hide
]
È possibile impostare diverse opzioni della tabella pivot utilizzando Aspose.Cells. Una di queste opzioni è “Per le celle vuote mostra”. Impostando questa opzione, tutte le celle vuote in una tabella pivot vengono visualizzate come una stringa specificata.
Impostazione dell’opzione tabella pivot in Microsoft Excel
Per trovare e impostare questa opzione in Microsoft Excel:
- Seleziona una tabella pivot e fai clic con il pulsante destro del mouse.
- SelezionareOpzioni tabella pivot.
- Seleziona ilDisposizione e formato scheda.
- Seleziona ilPer le celle vuote mostra opzione e specificare una stringa.
Impostazione dell’opzione tabella pivot utilizzando Aspose.Cells
Aspose.Cells fornisce ilPivotTable.DisplayNullString ePivotTable.NullString proprietà per l’impostazione dell’opzione tabella pivot “Per le celle vuote mostra”.
This file contains 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 | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
Workbook wb = new Workbook(dataDir + "input.xlsx"); | |
PivotTable pt = wb.Worksheets[0].PivotTables[0]; | |
// Indicating if or not display the empty cell value | |
pt.DisplayNullString = true; | |
// Indicating the null string | |
pt.NullString = "null"; | |
pt.CalculateData(); | |
pt.RefreshDataOnOpeningFile = false; | |
wb.Save(dataDir+ "output_out.xlsx"); |