Anzahl der Zellen im Arbeitsblatt zählen
Contents
[
Hide
]
Sie können die Anzahl der Zellen im Arbeitsblatt mithilfe der Cells.count oder Cells.count_large Eigenschaften wie im folgenden Codebeispiel gezeigt zählen.
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
from aspose.cells import Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# Source directory | |
sourceDir = RunExamples.Get_SourceDirectory() | |
# Load source Excel file | |
workbook = Workbook(sourceDir + "BookWithSomeData.xlsx") | |
# Access first worksheet | |
worksheet = workbook.worksheets[0] | |
# Print number of cell in the Worksheet | |
print("Number of Cells: " + str(worksheet.cells.count)) | |
# In the number of cells is greater than 2147483647, use CountLarge | |
print("Number of Cells (CountLarge): " + str(worksheet.cells.count_large)) |