Çalışma Sayfasındaki Hücrelerin Sayısını Say
Contents
[
Hide
]
Aşağıdaki örnekte verilen kod örneğinde gösterildiği gibi, çalışma sayfasındaki hücre sayısını Cells.Count veya Cells.CountLarge özelliklerini kullanarak sayabilirsiniz.
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 + "BookWithSomeData.xlsx"); | |
//Access first worksheet | |
Worksheet worksheet = workbook.Worksheets[0]; | |
//Print number of cell in the Worksheet | |
Console.WriteLine("Number of Cells: " + worksheet.Cells.Count); | |
// In the number of cells is greater than 2147483647, use CountLarge | |
Console.WriteLine("Number of Cells (CountLarge): " + worksheet.Cells.CountLarge); |