Gets or sets the height of rows that contain this cell range.
NuGet Package: DevExpress.Spreadsheet.Core
The row height in measurement units defined by the
Occurs if the row height exceeds 409 points.
If rows that contain the cell range have different heights, the
RowHeight property returns the height of the topmost row.
This example demonstrates how to control the row height in a worksheet.
Set Height for Individual Rows
AutoFit Row Height
Use the SpreadsheetCellOptions.AutoFitMergedCellRowHeight property to enable the AutoFit functionality for rows that have cells merged across.
Match the Height of Two Rows
To match one row height to another, make their Row.Height property values equal.
Set the Default Row Height
To set the default height for worksheet rows, use the Worksheet.DefaultRowHeight property. This property does not affect rows with an explicitly specified height.
Set the Height for All Rows in a Worksheet
To change the height of all rows in a worksheet, use the
CellRange.RowHeight property of the Column object corresponding to any column in a worksheet. This sets the height of all rows to the same value, overriding all previously applied row height settings.
// Set the height of the 3rd row to 50 points workbook.Unit = DevExpress.Office.DocumentUnit.Point; worksheet.Rows.Height = 50; // Set the height of the row that contains the "C5" cell to 2 inches. workbook.Unit = DevExpress.Office.DocumentUnit.Inch; worksheet.Cells["C5"].RowHeight = 2; // Set the height of the 7th row to the height of the 3rd row. worksheet.Rows["7"].Height = worksheet.Rows["3"].Height; // Set the default row height to 30 points. workbook.Unit = DevExpress.Office.DocumentUnit.Point; worksheet.DefaultRowHeight = 30;