Inställning av pivottabellalternativ - för tom Cells Visa

Ställa in pivottabellalternativ i Microsoft Excel

För att hitta och ställa in det här alternativet i Microsoft Excel:

  1. Välj en pivottabell och högerklicka.
  2. VäljPivottabellalternativ.
  3. VäljLayout & Format flik.
  4. VäljFör tomma celler visa alternativet och ange en sträng.

Ställa in pivottabellalternativ med Aspose.Cells

Aspose.Cells tillhandahållerPivotTable.DisplayNullString ochPivotTable.NullString egenskaper för att ställa in pivottabellalternativet “Visa tomma celler”.

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

relaterade artiklar