获取工作表的唯一标识
Contents
[
Hide
]
获取工作表的唯一标识
Aspose.Cells提供了使用 Worksheet.UniqueId 属性获取工作表的唯一标识的功能。以下代码片段演示了使用 Worksheet.UniqueId 属性打印工作表的唯一标识。以下代码片段使用了这个 实例Excel文件。
示例代码
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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()); |