SpreadsheetGear Namespace > IRange Interface : Cells Property |
class Program { static void Main() { // Create a worksheet. SpreadsheetGear.IWorksheet worksheet = SpreadsheetGear.Factory.GetWorkbook().Worksheets["Sheet1"]; // Writes "6" (two columns by three rows). System.Console.WriteLine(worksheet.Cells["B3:C5"].Count); // Writes "2" (two columns). System.Console.WriteLine(worksheet.Cells["B3:C5"].Columns.Count); // Writes "6" (back to two columns by three rows). System.Console.WriteLine(worksheet.Cells["B3:C5"].Columns.Cells.Count); } }
Class Program Shared Sub Main() ' Create a worksheet. Dim worksheet As SpreadsheetGear.IWorksheet = SpreadsheetGear.Factory.GetWorkbook().Worksheets("Sheet1") ' Writes "6" (two columns by three rows). System.Console.WriteLine(worksheet.Cells("B3:C5").Count) ' Writes "2" (two columns). System.Console.WriteLine(worksheet.Cells("B3:C5").Columns.Count) ' Writes "6" (back to two columns by three rows). System.Console.WriteLine(worksheet.Cells("B3:C5").Columns.Cells.Count) End Sub 'Main End Class 'Program
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2