Impostazione dell opzione tabella pivot Per le celle vuote mostra
Contents
[
Hide
]
Puoi impostare diverse opzioni della tabella pivot usando Aspose.Cells for Node.js via C++. Una di queste opzioni è “Mostra per le celle vuote”. Impostando questa opzione, tutte le celle vuote in una tabella pivot vengono visualizzate come una stringa specificata.
Impostazione dell’opzione della 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.
- Seleziona Opzioni tabella pivot.
- Seleziona la scheda Layout e Formato.
- Seleziona l’opzione Per le celle vuote mostra e specifica una stringa.
Impostare l’opzione della tabella pivot usando Aspose.Cells for Node.js via C++
Aspose.Cells for Node.js via C++ fornisce le proprietà PivotTable.setDisplayNullString e PivotTable.setNullString per impostare l’opzione “Mostra per le celle vuote” nella tabella pivot.
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
const AsposeCells = require("aspose.cells.node"); | |
//For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
//The path to the documents directory. | |
var dataDir = RunExamples.GetDataDir("."); | |
var wb = new AsposeCells.Workbook(dataDir + "input.xlsx"); | |
var pt = wb.getWorksheets().get(0).getPivotTables().get(0); | |
//Indicating if or not display the empty cell value | |
pt.setDisplayNullString(true); | |
//Indicating the null string | |
pt.setNullString("null"); | |
pt.calculateData(); | |
pt.setRefreshDataOnOpeningFile(false); | |
wb.save(dataDir + "output_out.xlsx"); |