Impostazione dell opzione tabella pivot Per le celle vuote mostra

Come impostare l’opzione della tabella pivot in Microsoft Excel

Per trovare e impostare questa opzione in Microsoft Excel:

  1. Seleziona una tabella pivot e fai clic con il pulsante destro del mouse.
  2. Seleziona Opzioni tabella pivot.
  3. Seleziona la scheda Layout e Formato.
  4. Seleziona l’opzione Per le celle vuote mostra e specifica una stringa.

Come impostare l’opzione della tabella pivot utilizzando la libreria Aspose.Cells for Python Excel

Aspose.Cells for Python via .NET fornisce le proprietà PivotTable.display_null_string e PivotTable.null_string per impostare l’opzione della tabella pivot “Per le celle vuote mostra”.

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

Articoli correlati