Table of Contents

Class ExcelTableColumnCollection

Namespace
OfficeOpenXml.Table
Assembly
EPPlus.dll

A collection of table columns

public class ExcelTableColumnCollection : IEnumerable<ExcelTableColumn>, IEnumerable
Inheritance
ExcelTableColumnCollection
Implements
Inherited Members

Properties

Count

Number of items in the collection

public int Count { get; }

Property Value

int

this[int]

The column Index. Base 0.

public ExcelTableColumn this[int Index] { get; }

Parameters

Index int

Property Value

ExcelTableColumn

this[string]

Indexer

public ExcelTableColumn this[string Name] { get; }

Parameters

Name string

The name of the table

Property Value

ExcelTableColumn

The table column. Null if the table name is not found in the collection

Table

A reference to the table object

public ExcelTable Table { get; }

Property Value

ExcelTable

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