Nascondere la visualizzazione dei valori zero nel foglio di lavoro con Node.js tramite C++

Contents
[ ]

Per nascondere i valori zero in un foglio di lavoro in Microsoft Excel (ad esempio Microsoft Excel 2003):

  1. Dal menu Strumenti, selezionare Opzioni, e quindi selezionare la scheda Visualizza.
  2. Deselezionare l’opzione Valori zero.
  3. Fai clic su OK.

Consulta il seguente esempio di codice che dimostra come nascondere gli zeri usando Aspose.Cells for Node.js via C++.

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "book1.xlsx");
// Create a new Workbook object
const workbook = new AsposeCells.Workbook(filePath);

// Get First worksheet of the workbook
const sheet = workbook.getWorksheets().get(0);

// Hide the zero values in the sheet
sheet.setDisplayZeros(false);

// Save the workbook
workbook.save(path.join(dataDir, "outputfile.out.xlsx"));