Class ExcelTableColumnCollection
A collection of table columns
Inheritance
Inherited Members
Namespace: OfficeOpenXml.Table
Assembly: EPPlus.dll
Syntax
public class ExcelTableColumnCollection : IEnumerable<ExcelTableColumn>, IEnumerable
Properties
Count
Number of items in the collection
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Int32]
The column Index. Base 0.
Declaration
public ExcelTableColumn this[int Index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Index |
Property Value
Type | Description |
---|---|
ExcelTableColumn |
Item[String]
Indexer
Declaration
public ExcelTableColumn this[string Name] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | Name | The name of the table |
Property Value
Type | Description |
---|---|
ExcelTableColumn | The table column. Null if the table name is not found in the collection |
Table
A reference to the table object
Declaration
public ExcelTable Table { get; }
Property Value
Type | Description |
---|---|
ExcelTable |
Methods
Add(Int32)
Adds one or more columns at the end of the table.
Declaration
public ExcelRangeBase Add(int columns = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | columns | Number of columns to add. |
Returns
Type | Description |
---|---|
ExcelRangeBase | The added range |
Delete(Int32, Int32)
Deletes one or more columns from the specified position in the table.
Declaration
public ExcelRangeBase Delete(int position, int columns = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | position | The position in the table where the column will be inserted. 0 will insert the column at the leftmost position. Any value larger than the number of rows in the table will insert a row at the end of the table. |
System.Int32 | columns | Number of columns to insert. |
Returns
Type | Description |
---|---|
ExcelRangeBase | The inserted range |
Insert(Int32, Int32)
Inserts one or more columns before the specified position in the table.
Declaration
public ExcelRangeBase Insert(int position, int columns = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | position | The position in the table where the column will be inserted. 0 will insert the column at the leftmost position. Any value larger than the number of rows in the table will insert a row at the end of the table. |
System.Int32 | columns | Number of columns to insert. |
Returns
Type | Description |
---|---|
ExcelRangeBase | The inserted range |
Explicit Interface Implementations
IEnumerable<ExcelTableColumn>.GetEnumerator()
Declaration
IEnumerator<ExcelTableColumn> IEnumerable<ExcelTableColumn>.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<ExcelTableColumn> |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |