ExcelWorksheetCells Property |
Gets all the cells in the sheet.
Namespace:
GemBox.Spreadsheet
Assembly:
GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 45.0.35.1069
Syntaxpublic CellRange Cells { get; }
Public ReadOnly Property Cells As CellRange
Get
Property Value
Type:
CellRange
All the cells in the sheet.
ExamplesLook at following code for cell referencing examples:
ExcelWorksheet ws = excelFile.Worksheets.ActiveWorksheet;
ws.Cells["B2"].Value = "Cell B2.";
ws.Cells[6, 0].Value = "Cell in row 7 and column A.";
ws.Rows[2].Cells[0].Value = "Cell in row 3 and column A.";
ws.Rows["4"].Cells["B"].Value = "Cell in row 4 and column B.";
ws.Columns[2].Cells[4].Value = "Cell in column C and row 5.";
ws.Columns["AA"].Cells["6"].Value = "Cell in AA column and row 6.";
Dim ws As ExcelWorksheet = excelFile.Worksheets.ActiveWorksheet
ws.Cells("B2").Value = "Cell B2."
ws.Cells(6, 0).Value = "Cell in row 7 and column A."
ws.Rows(2).Cells(0).Value = "Cell in row 3 and column A."
ws.Rows("4").Cells("B").Value = "Cell in row 4 and column B."
ws.Columns(2).Cells(4).Value = "Cell in column C and row 5."
ws.Columns("AA").Cells("6").Value = "Cell in AA column and row 6."
See Also