Imposta il colore della scheda del foglio di lavoro con Node.js tramite C++

Impostare il Colore della Scheda del Foglio di Lavoro con Microsoft Excel

  1. Fare clic con il pulsante destro del mouse su una scheda nell’insieme di schede nella parte inferiore della scheda corrente.
  2. Seleziona Colore scheda.
  3. Seleziona un colore dalla tavolozza.
  4. Fai clic su OK.

Impostazione colore scheda foglio di calcolo con Aspose.Cells

Il codice di esempio di seguito mostra come impostare il colore della scheda con Aspose.Cells.

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

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Instantiate a new Workbook
// Open an Excel file
const workbook = new AsposeCells.Workbook(path.join(dataDir, "Book1.xlsx"));

// Get the first worksheet in the book
const worksheet = workbook.getWorksheets().get(0);

// Set the tab color
worksheet.setTabColor(AsposeCells.Color.Red);

// Save the Excel file
workbook.save(path.join(dataDir, "worksheettabcolor.out.xls"));