[]
public class XLColumnCollection : IEnumerable
<p>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.
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
Name | Description |
---|---|
Book | Gets a reference to the parent C1XLBook object. |
Count | Gets the number of items in the collection. |
Frozen | Gets or sets the number of frozen columns in the collection. |
this[int] | Returns a reference to the XLColumn object at the specified index. |
Sheet | Gets a reference to the parent XLSheet object. |
Name | Description |
---|---|
Add() | Creates a new XLColumn object and adds it to the collection. |
Add(XLColumn) | Adds an XLColumn object to the collection. |
Clear() | Removes all items from the collection. |
Contains(XLColumn) | Determines whether an XLColumn is a member of the collection. |
IndexOf(XLColumn) | Gets the index of a given XLRow object in the collection. |
Insert(int) | Creates a new XLColumn object and inserts it at a specific position in the collection. |
Insert(int, XLColumn) | Inserts an XLColumn object at a specific position in the collection. |
Insert(int, XLColumn, XLCell[]) | Inserts an XLColumn object at a specific position in the collection. |
Remove(XLColumn) | Removes an XLColumn object from the collection. |
RemoveAt(int) | Removes the XLColumn object at a given position from the collection. |