Click or drag to resize

XlsWorksheet GetRowHeightPixels Method

Gets the height of a specified row in unit of pixel.
Examples
The following code illustrates how to get the row height for a particular row:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["C2"].Text = "Sample text";</para><para>worksheet["C2"].Style.Font.Size = 18;</para><para>//Set auto fit</para><para>worksheet.AutoFitRow(2);</para><para>//Get row height</para><para>Console.WriteLine(worksheet.GetRowHeightPixels(2));</para><para>//Save to file</para><para>workbook.SaveToFile("UsedRange.xlsx");</para>

Namespace: Spire.Xls.Core.Spreadsheet
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
public int GetRowHeightPixels(
	int rowIndex
)

Parameters

rowIndex
Type: System Int32
Row index.

Return Value

Type: Int32
Height of row

Implements

IWorksheet GetRowHeightPixels(Int32)
See Also