Get worksheet unique id

Get worksheet unique id

Aspose.Cells provides the ability to get the unique id of a worksheet by using the Worksheet.UniqueId property. The following code snippet demonstrates the use of the Worksheet.UniqueId property to print the unique id of a worksheet. The following code snippet uses this sample excel file.

Sample Code

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
//Source directory
String sourceDir = Utils.Get_SourceDirectory();
// Load source Excel file
Workbook workbook = new Workbook(sourceDir + "Book1.xlsx");
// Access first worksheet
Worksheet worksheet = workbook.getWorksheets().get(0);
// Print Unique Id
System.out.println("Unique Id: " + worksheet.getUniqueId());