Get worksheet unique id with Node.js via C++

Get worksheet unique id

Aspose.Cells for Node.js via C++ provides the ability to get the unique id of a worksheet by using the Worksheet.getUniqueId() property. The following code snippet demonstrates the use of the Worksheet.getUniqueId() property to print the unique id of a worksheet. The following code snippet uses this sample excel file.

Source Code

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

// The path to the documents directory.
const sourceDir = path.join(__dirname, "data");

// Load source Excel file
const workbook = new AsposeCells.Workbook(path.join(sourceDir, "Book1.xlsx"));

// Access first worksheet
const worksheet = workbook.getWorksheets().get(0);

// Print Unique Id
console.log("Unique Id: " + worksheet.getUniqueId());