获取工作表唯一ID
Contents
[
Hide
]
获取工作表唯一ID
Aspose.Cells 提供了通过使用工作表.UniqueId财产。下面的代码片段演示了使用工作表.UniqueId打印工作表唯一 ID 的属性。下面的代码片段使用了这个示例 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()); |