Impostazione dell opzione tabella pivot Per le celle vuote mostra

Impostazione dell’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.

Impostare l’opzione della tabella pivot utilizzando Aspose.Cells

Aspose.Cells fornisce le proprietà PivotTable.DisplayNullString e PivotTable.NullString per impostare l’opzione della tabella pivot “Per le celle vuote mostrare”.

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

Articoli correlati