# Set Row Height and Column Width

Customize the height of the rows and the width of the columns in a spreadsheet based on specific preferences using DsExcel.

## Content

You can set the height of the rows and the width of the columns in a worksheet as per your preferences by using the [UseStandardHeight](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.UseStandardHeight.html) property and [UseStandardWidth](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.UseStandardWidth.html) property of the [IRange](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.html) interface respectively.
You can use the [ColumnWidth](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.ColumnWidth.html) property to set custom width in characters for the individual columns of a range. In order to set custom width in pixels, you can use the [ColumnWidthInPixel](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.ColumnWidthInPixel.html) property of the IRange interface.
You can also set custom height of the individual rows of a range in points and in pixels by using the [RowHeight](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.RowHeight.html) property and [RowHeightInPixel](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.RowHeightInPixel.html) property of the IRange interface[.](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.RowHeight.html)
In order to specify custom total height and total width, you can use the [Height](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.Height.html) (in points), [HeightInPixel](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.HeightInPixel.html) (in pixels), [Width](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.Width.html) (in characters) and [WidthInPixel](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.IRange.WidthInPixel.html) (in pixels) properties of the IRange interface.
Refer to the following example code in order to customize the row height and column width in a worksheet.

```csharp
//set row height for row 1:2.
worksheet.Range["1:2"].RowHeight = 50;

//set column width for column C:D.
worksheet.Range["C:D"].ColumnWidth = 20;
```