Get worksheet unique id
Contents
[
Hide
]
How to Get worksheet unique id
Aspose.Cells for Python via .NET provides the ability to get the unique id of a worksheet by using the Worksheet.unique_id property. The following code snippet demonstrates the use of the Worksheet.unique_id property to print the unique id of a worksheet. The following code snippet uses this sample excel file.
Source Code
This file contains hidden or 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
| from aspose.cells import Workbook | |
| # Source directory | |
| sourceDir = "./" | |
| # Load source Excel file | |
| workbook = Workbook(sourceDir + "Book1.xlsx") | |
| # Access first worksheet | |
| worksheet = workbook.worksheets[0] | |
| # Print Unique Id | |
| print("Unique Id: " + worksheet.unique_id) |