XlsWorksheet AutoFitColumn Method |
Name | Description | |
---|---|---|
![]() ![]() |
AutoFitColumn(Int32) |
Autofit the column width.
![]()
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>
|
![]() |
AutoFitColumn(Int32, AutoFitterOptions) |
Autofit the column width.
|
![]() |
AutoFitColumn(Int32, Int32, Int32) |
Autofit the column width.
|
![]() |
AutoFitColumn(Int32, Int32, Int32, AutoFitterOptions) |
Autofit the column width.
|