# Access Cells, Rows and Columns in a Range

With DsExcel, you can easily access cells, rows, and columns in a range. Learn more in DsExcel docs.

## Content





You can access cells, rows and columns in a range by using the [getCells](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/IRange.html#getCells) method, the [getRows](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/IRange.html#getRows) method and the [getColumns](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/IRange.html#getColumns) method of the [IRange](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/IRange.html) interface.

Refer to the following example code in order to access cells, rows and columns in a worksheet.

```Java
// Create a new workbook and fetch the worksheet
Workbook workbook = new Workbook();
IWorksheet worksheet = workbook.getWorksheets().add();
        
// Access Range and set A1:B5, C2:E4's interior color
worksheet.getRange("A1:B5, C2:E4").getInterior().setColor(Color.GetGreen());
        
// Access Rows and set row 1's font size
worksheet.getRows().get(0).getFont().setSize(20);
        
// Access Columns and delete column C
worksheet.getColumns().get(2).delete();
        
// Access Cells and set A1's value
worksheet.getCells().get(0).setValue(1);
```