Class ExcelTableColumnCollection
A collection of table columns
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 |
|---|---|
| int |
this[int]
The column Index. Base 0.
Declaration
public ExcelTableColumn this[int Index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | Index |
Property Value
| Type | Description |
|---|---|
| ExcelTableColumn |
this[string]
Indexer
Declaration
public ExcelTableColumn this[string Name] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| 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(int)
Adds one or more columns at the end of the table.
Declaration
public ExcelRangeBase Add(int columns = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| int | columns | Number of columns to add. |
Returns
| Type | Description |
|---|---|
| ExcelRangeBase | The added range |
Delete(int, int)
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 |
|---|---|---|
| int | 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. |
| int | columns | Number of columns to insert. |
Returns
| Type | Description |
|---|---|
| ExcelRangeBase | The inserted range |
Insert(int, int)
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 |
|---|---|---|
| int | 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. |
| int | columns | Number of columns to insert. |
Returns
| Type | Description |
|---|---|
| ExcelRangeBase | The inserted range |