The ColumnProperties class represents a single column in a worksheet.
RemarksTo return a
ColumnProperties object, use Worksheet.GetColumnProperties(). The following sample gets the column properties for the first column of the first worksheet.
|Returns the column's 0-based index.
|Sets or returns whether or not the column will be hidden when the workbook is opened in Excel.
|Sets or returns whether the column's outlined column group is collapsed. If the outline is collapsed, the column is hidden.
|Sets or returns the outline level of the column, as a value between 0 and 7. The outline level is used to control grouping in Excel. For example, to group several columns, set their outline levels to 1; to group a subset of columns within the group, set their outline levels to 2.
|Returns 'padding' (in characters) that needs to be added to the column width (in characters) to get true width of this column.
|Sets or returns a Style object that determines how cells in the column look, including number format, font, orientation, etc.
|Sets or returns the width of the column in points (1/72 of an inch).
|Sets or returns the width of the column as a number of '0' characters in the font of the 'Normal' style. This must be a value between 0 - 255.
|Applies a style to the column. When a style is applied - rather than set (see ColumnProperties.Style ) - only the differences between the new style and style properties previously assigned to the column (through the ExcelWriter API or in Microsoft Excel) will take effect. For example, if a cell in the column has a background color and the new style applied does not contain a background color, the cell's color will not be affected.
|Automatically sets the width of the column to the width of the widest cell value in the column.