Inställning av pivottabellalternativ För tomma celler Visa
Contents
[
Hide
]
Du kan ställa in olika pivottabellalternativ med hjälp av Aspose.Cells for Node.js via C++. Ett sådant alternativ är “Visa för tomma celler”. Genom att ställa in detta alternativ visas alla tomma celler i pivottabellen som en specificerad sträng.
Inställning av pivottabellalternativ i Microsoft Excel
För att hitta och ställa in detta alternativ i Microsoft Excel:
- Välj en pivottabell och högerklicka.
- Välj Pivottabellalternativ.
- Välj fliken Layout & Format.
- Välj alternativet Visa en sträng för tomma celler och ange en sträng.
Ställa in pivottabellalternativ med Aspose.Cells for Node.js via C++
Aspose.Cells for Node.js via C++ tillhandahåller egenskaperna PivotTable.setDisplayNullString och PivotTable.setNullString för att ställa in “Visa för tomma celler”-alternativet i pivottabellen.
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"); |