# Set Values to a Range

DsExcel allows you to specify custom values for a cell range. Learn more in DsExcel docs.

## Content

DsExcel allows users to specify custom values for the cell range by using the properties and methods of the [IRange](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.html) interface.
Refer to the following example code in order to set custom values to cell ranges in the worksheet.

```csharp
worksheet.Range["A:F"].ColumnWidth = 15;
object[,] data = new object[,]{
       {"Name", "City", "Birthday", "Eye color", "Weight", "Height"},
       {"Richard", "New York", new DateTime(1968, 6, 8), "Blue", 67, 165},
       {"Nia", "New York", new DateTime(1972, 7, 3), "Brown", 62, 134},
       {"Jared", "New York", new DateTime(1964, 3, 2), "Hazel", 72, 180},
       {"Natalie", "Washington", new DateTime(1972, 8, 8), "Blue", 66, 163},
       {"Damon", "Washington", new DateTime(1986, 2, 2), "Hazel", 76, 176},
       {"Angela", "Washington", new DateTime(1993, 2, 15), "Brown", 68, 145}
  };

// Set two-dimension array value to range A1:F7
worksheet.Range["A1:F7"].Value = data;

// Return a two-dimension array when get range A1:B7's value.
var result = worksheet.Range["A1:B7"].Value;
```

![](https://cdn.mescius.io/document-site-files/images/e333ad47-35da-43f9-a389-25433765f491/images/value-to-range.png)