Click or drag to resize

XlsWorksheet AutoFitRow Method

Overload List
Name Description
Public method Code example AutoFitRow(Int32)
Autofit the row height.
Examples
The following code illustrates how to Auto-fit the 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"].Value = "Sample text";</para><para>//Set Style</para><para>CellStyle style = workbook.Styles.Add("CustomStyle");</para><para>IFont font = style.Font;</para><para>font.Size = 18;</para><para>worksheet["C2"].Style = style;</para><para>//Set auto fit</para><para>worksheet.AutoFitRow(2);</para><para>//Save to file</para><para>workbook.SaveToFile("AutoFitRow.xlsx");</para>
Public method AutoFitRow(Int32, Int32, Int32, AutoFitterOptions)
Autofit the row height.
Public method AutoFitRow(Int32, Int32, Int32, Boolean)
Autofit the row height.
Public method AutoFitRow(Int32, Int32, Int32, Boolean, AutoFitterOptions)
Autofit the row height.
Top
See Also