//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; var range = worksheet.Range["A5:B7"]; //cell count is 6. var cellcount = range.Count; //cell count is 6. var cellcount1 = range.Cells.Count; //row count is 3. var rowcount = range.Rows.Count; //column count is 2. var columncount = range.Columns.Count;
' Create a new Workbook Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets(0) Dim range = worksheet.Range("A5:B7") 'cell count is 6. Dim cellcount = range.Count 'cell count is 6. Dim cellcount1 = range.Cells.Count 'row count is 3. Dim rowcount = range.Rows.Count 'column count is 2. Dim columncount = range.Columns.Count