Skip to content

Class ExcelTableColumnCollection

Namespace: OfficeOpenXml.Table
Assembly: EPPlus.dll

A collection of table columns

public class ExcelTableColumnCollection : IEnumerable<ExcelTableColumn>, IEnumerable

Inheritance

object ← ExcelTableColumnCollection

Implements

IEnumerable
IEnumerable<ExcelTableColumn>

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Properties

Count

Number of items in the collection

public int Count { get; }

Property Value

int

Table

A reference to the table object

public ExcelTable Table { get; }

Property Value

ExcelTable

this[int]

The column Index. Base 0.

public ExcelTableColumn this[int Index] { get; }

Property Value

ExcelTableColumn

this[string]

Indexer

public ExcelTableColumn this[string Name] { get; }

Property Value

ExcelTableColumn

Methods

Add(int)

Adds one or more columns at the end of the table.

public ExcelRangeBase Add(int columns = 1)

Parameters

columns int

Number of columns to add.

Returns

ExcelRangeBase

The added range

Delete(int, int)

Deletes one or more columns from the specified position in the table.

public ExcelRangeBase Delete(int position, int columns = 1)

Parameters

position int

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.

columns int

Number of columns to insert.

Returns

ExcelRangeBase

The inserted range

Insert(int, int)

Inserts one or more columns before the specified position in the table.

public ExcelRangeBase Insert(int position, int columns = 1)

Parameters

position int

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.

columns int

Number of columns to insert.

Returns

ExcelRangeBase

The inserted range