Columns Class

Column Information.When the object is serialized out as xml, its qualified name is x:cols.

Inheritance Hierarchy


Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)


<ChildElementInfoAttribute(GetType(Column))> _
Public Class Columns _
    Inherits OpenXmlCompositeElement
Dim instance As Columns
public class Columns : OpenXmlCompositeElement


The following table lists the possible child types:

  • Column <x:col>

[ISO/IEC 29500-1 1st Edition] cols (Column Information)

Information about whole columns of the worksheet.


This example shows that column 4 (D) has 'best fit' applied to it, which is also a custom width. Also, column 5 (E) is listed as having a custom width and a style applied at the column level (as opposed to the cell level).

<col min="4" max="4" width="12" bestFit="1" customWidth="1"/>
<col min="5" max="5" width="9.140625" style="3"/>

end example]

Parent Elements

worksheet (§

Child Elements


col (Column Width & Formatting)


[Note: The W3C XML Schema definition of this element’s content model (CT_Cols) is located in §A.2. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


Columns Members

DocumentFormat.OpenXml.Spreadsheet Namespace