ワークシート内のセルの数を数えます
Contents
[
Hide
]
ワークシート内のセルの数を数えます
Aspose.Cells for Python via Javaは、ワークシート内のセルの数を数える機能を提供しています。このためにAPIはCells.getCount()またはCells.getCountLarge()プロパティを提供します。
次のコードスニペットには、Cells.getCount() または Cells.getCountLarge() プロパティを使用してワークシート内のセルの数を取得する方法が示されています。
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
source_directory = "Examples/SampleFiles/SourceDirectory/" | |
# Load source Excel file | |
workbook = Workbook(source_directory + "Book1.xlsx") | |
# Access first worksheet | |
worksheet = workbook.getWorksheets().get(0) | |
# Print number of cells in the Worksheet | |
print("Number of Cells: " + str(worksheet.getCells().getCount())) |