Syncfusion.XlsIO.Base
Example 


One-based row index.

GetRowHeight Method

Returns the height of the specified row.
Syntax
'Declaration
 
Function GetRowHeight( _
   ByVal iRow As Integer _
) As Double
'Usage
 
Dim instance As IWorksheet
Dim iRow As Integer
Dim value As Double
 
value = instance.GetRowHeight(iRow)
double GetRowHeight( 
   int iRow
)

Parameters

iRow
One-based row index.

Return Value

Returns height of the specified row. Otherwise returns StandardHeight.
Example
The following code illustrates how to get the row height for a particular row.
using Syncfusion.XlsIO;
using System;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Load data
            worksheet["C2"].Value = "Sample text";
            
            //Create style
            IStyle style = workbook.Styles.Add("CustomStyle");
            
            //Set font
            IFont font = style.Font;
            
            //Set font size
            font.Size = 18;
            
            //Set style
            worksheet["C2"].CellStyle = style;
            
            //Set auto fit
            worksheet.AutofitRow(2);
            
            //Get row width
            Console.WriteLine(worksheet.GetRowHeight(2));
            
            //Save and dispose
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close();
            Console.ReadKey();
        }
    }
}
//Output will be
//21.95
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also