Node.jsをC++経由で使用して、ワークシート内のテーブルまたはリストオブジェクトのコメントを設定する

ワークシート内のテーブルまたはリストオブジェクトのコメントを設定してください

以下のサンプルコードは、ソースエクセルファイルを読み込み、ワークシート内の最初のテーブルまたはリストオブジェクトのコメントを設定します。

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