Einstellen der Pivot-Tabellenoption - Für leere Cells-Anzeige

Festlegen der Pivot-Tabellenoption in Microsoft Excel

So finden und setzen Sie diese Option in Microsoft Excel:

  1. Wählen Sie eine Pivot-Tabelle aus und klicken Sie mit der rechten Maustaste.
  2. WählenPivotTable-Optionen.
  3. Wähle ausLayout & Format Tab.
  4. Wähle ausFür leere Zellen anzeigen Option und geben Sie eine Zeichenfolge an.

Festlegen der Pivot-Tabellenoption mit Aspose.Cells

Aspose.Cells bietet diePivotTable.DisplayNullString undPivotTable.NullString Eigenschaften zum Festlegen der Pivot-Tabellenoption “Für leere Zellen anzeigen”.

// 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");

Zum Thema passende Artikel