Class ExcelTableColumn¶
Namespace: OfficeOpenXml.Table
Assembly: EPPlus.dll
A table column
Inheritance¶
object ← XmlHelper ← ExcelTableDxfBase ← ExcelTableColumn
Inherited Members¶
ExcelTableDxfBase.DataStyle
ExcelTableDxfBase.HeaderRowStyle
ExcelTableDxfBase.TotalsRowStyle
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Properties¶
CalculatedColumnFormula¶
Sets a calculated column Formula. Be careful 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
Property Value¶
DataCellStyleName¶
The named style for datacells in the column
Property Value¶
Id¶
The column id
Property Value¶
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)
Property Value¶
bool?
Exceptions¶
If the CalculatedColumnFormula is null or empty.
Name¶
The name of the column
Property Value¶
Position¶
The position of the column
Property Value¶
Slicer¶
Returns the slicer attached to a column. If the column has multiple slicers, the first is returned.
Property Value¶
Table¶
The ExcelTable containing the table column
Property Value¶
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);
Property Value¶
TotalsRowFunction¶
Build-in total row functions. To set a custom Total row formula use the TotalsRowFormula property TotalsRowFormula
Property Value¶
TotalsRowLabel¶
A string text in the total row
Property Value¶
Methods¶
AddSlicer()¶
Adds a slicer drawing connected to the column
Returns¶
The table slicer drawing object