Show / Hide Table of Contents

Class ExcelTableColumn

A table column

Inheritance
System.Object
XmlHelper
ExcelTableDxfBase
ExcelTableColumn
Inherited Members
ExcelTableDxfBase.HeaderRowStyle
ExcelTableDxfBase.DataStyle
ExcelTableDxfBase.TotalsRowStyle
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OfficeOpenXml.Table
Assembly: EPPlus.dll
Syntax
public class ExcelTableColumn : ExcelTableDxfBase

Properties

CalculatedColumnFormula

Sets a calculated column Formula. Be carefull with this property since it is not validated. tbl.Columns[9].CalculatedColumnFormula = string.Format("SUM(MyDataTable[[#This Row],[{0}]])",tbl.Columns[9].Name); //Reference within the current row tbl.Columns[9].CalculatedColumnFormula = string.Format("MyDataTable[[#Headers],[{0}]]",tbl.Columns[9].Name); //Reference to a column header tbl.Columns[9].CalculatedColumnFormula = string.Format("MyDataTable[[#Totals],[{0}]]",tbl.Columns[9].Name); //Reference to a column total

Declaration
public string CalculatedColumnFormula { get; set; }
Property Value
Type Description
System.String

DataCellStyleName

The named style for datacells in the column

Declaration
public string DataCellStyleName { get; set; }
Property Value
Type Description
System.String

Id

The column id

Declaration
public int Id { get; set; }
Property Value
Type Description
System.Int32

IsCalculatedFormulaArray

If the calculated formula is an array formula. This property will be set if the formula calculation evaluate the formula as an array formula. See Calculate(ExcelWorkbook)

Declaration
public bool? IsCalculatedFormulaArray { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>
Exceptions
Type Condition
System.InvalidOperationException

If the CalculatedColumnFormula is null or empty.

Name

The name of the column

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

Position

The position of the column

Declaration
public int Position { get; }
Property Value
Type Description
System.Int32

Slicer

Returns the slicer attached to a column. If the column has multiple slicers, the first is returned.

Declaration
public ExcelTableSlicer Slicer { get; }
Property Value
Type Description
ExcelTableSlicer

Table

The ExcelTable containing the table column

Declaration
public ExcelTable Table { get; }
Property Value
Type Description
ExcelTable

TotalsRowFormula

Sets a custom Totals row Formula. Be carefull with this property since it is not validated. tbl.Columns[9].TotalsRowFormula = string.Format("SUM([{0}])",tbl.Columns[9].Name);

Declaration
public string TotalsRowFormula { get; set; }
Property Value
Type Description
System.String

TotalsRowFunction

Build-in total row functions. To set a custom Total row formula use the TotalsRowFormula property TotalsRowFormula

Declaration
public RowFunctions TotalsRowFunction { get; set; }
Property Value
Type Description
RowFunctions

TotalsRowLabel

A string text in the total row

Declaration
public string TotalsRowLabel { get; set; }
Property Value
Type Description
System.String

Methods

AddSlicer()

Adds a slicer drawing connected to the column

Declaration
public ExcelTableSlicer AddSlicer()
Returns
Type Description
ExcelTableSlicer

The table slicer drawing object

In This Article
  • Properties
    • CalculatedColumnFormula
    • DataCellStyleName
    • Id
    • IsCalculatedFormulaArray
    • Name
    • Position
    • Slicer
    • Table
    • TotalsRowFormula
    • TotalsRowFunction
    • TotalsRowLabel
  • Methods
    • AddSlicer()
Back to top Generated by DocFX