Imposta il Commento della Tabella o Oggetto Lista all’interno del Foglio di lavoro con Node.js tramite C++

Imposta il commento della tabella o dell’oggetto lista all’interno del foglio di lavoro

Il seguente codice di esempio carica il file di origine excel, imposta il commento della prima tabella o primo oggetto elenco all’interno del foglio di lavoro.

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

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Open the template file.
const workbook = new AsposeCells.Workbook(path.join(dataDir, "table_comment.xlsx"));
// Access first worksheet.
const worksheet = workbook.getWorksheets().get(0);
// Access first list object or table.
const lstObj = worksheet.getListObjects().get(0);
// Set the comment of the list object
lstObj.setComment("This is Aspose.Cells comment.");
// Save the workbook in xlsx format
workbook.save(path.join(dataDir, "SetCommentOfTableOrListObject_out.xlsx"), AsposeCells.SaveFormat.Xlsx);