Inställning av pivottabellalternativ För tomma celler Visa

Hur man ställer in pivottabellalternativ i Microsoft Excel

För att hitta och ställa in detta alternativ i Microsoft Excel:

  1. Välj en pivottabell och högerklicka.
  2. Välj Pivottabellalternativ.
  3. Välj fliken Layout & Format.
  4. Välj alternativet Visa en sträng för tomma celler och ange en sträng.

Hur man ställer in pivottabellalternativ med hjälp av Aspose.Cells för Python Excel-bibliotek

Aspose.Cells för Python via .NET tillhandahåller egenskaperna PivotTable.display_null_string och PivotTable.null_string för att ställa in pivottabellalternativet “Visa tomma celler”.

from aspose.cells import Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
wb = Workbook(dataDir + "input.xlsx")
pt = wb.worksheets[0].pivot_tables[0]
# Indicating if or not display the empty cell value
pt.display_null_string = True
# Indicating the null string
pt.null_string = "null"
pt.calculate_data()
pt.refresh_data_on_opening_file = False
wb.save(dataDir + "output_out.xlsx")

Relaterade artiklar