ワークシートの一意のIDを取得
Contents
[
Hide
]
ワークシートの一意のIDを取得
Aspose.Cellsを使用すると、Worksheet.UniqueIdプロパティを使用してワークシートの一意のIDを取得できます。以下のコードスニペットは、Worksheet.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-.NET | |
// Source directory | |
string sourceDir = RunExamples.Get_SourceDirectory(); | |
// Load source Excel file | |
Workbook workbook = new Workbook(sourceDir + "Book1.xlsx"); | |
// Access first worksheet | |
Worksheet worksheet = workbook.Worksheets[0]; | |
// Print Unique Id | |
Console.WriteLine("Unique Id: " + worksheet.UniqueId); |