Click or drag to resize

XlsWorksheet AutoFitColumn Method

Overload List
Name Description
Public method Code example AutoFitColumn(Int32)
Autofit the column width.
Examples
The following code illustrates how to Auto-fit the column:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["A1"].Text = "Sample text in cell";</para><para>//Set auto fit</para><para>worksheet.AutoFitColumn(1);</para><para>//Save to file</para><para>workbook.SaveToFile("AutoFitColumn.xlsx");</para>
Public method AutoFitColumn(Int32, AutoFitterOptions)
Autofit the column width.
Public method AutoFitColumn(Int32, Int32, Int32)
Autofit the column width.
Public method AutoFitColumn(Int32, Int32, Int32, AutoFitterOptions)
Autofit the column width.
Top
See Also