ComponentOne Excel for .NET
C1.Excel Assembly / C1.Excel Namespace / XLColumnCollection Class
Members Example

In This Topic
    XLColumnCollection Class
    In This Topic
    Represents a collection of XLColumn objects that represent the individual columns in each XLSheet.
    Object Model
    XLColumnCollection Class
    Syntax
    'Declaration
     
    Public Class XLColumnCollection 
    public class XLColumnCollection 
    Remarks

    The collection has methods for counting, enumerating, adding, and removing columns from the collection.

    The XLColumn objects do not contain any data. If you remove a column from the collection, the data will be lost. If you later re-insert that same column back into the collection, the column will be blank.

    Example
    Note that you can create columns automatically by using the sheet's indexer. For example, the following code retrieves the cell at coordinates (3,3) and in doing so automatically creates four rows and four columns automatically:
    C1XLBook book  = new C1XLBook();
    XLSheet  sheet = book.Sheets[0];
    XLCell   cell  = sheet[3,3]; // creates 4 rows and 4 columns
    Inheritance Hierarchy

    System.Object
       C1.Excel.XLColumnCollection

    See Also