TableColumn Class

Table Column.When the object is serialized out as xml, its qualified name is x:tableColumn.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Spreadsheet.TableColumn

Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(CalculatedColumnFormula))> _
<ChildElementInfoAttribute(GetType(TotalsRowFormula))> _
<ChildElementInfoAttribute(GetType(XmlColumnProperties))> _
<ChildElementInfoAttribute(GetType(ExtensionList))> _
Public Class TableColumn _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As TableColumn
[ChildElementInfoAttribute(typeof(CalculatedColumnFormula))]
[ChildElementInfoAttribute(typeof(TotalsRowFormula))]
[ChildElementInfoAttribute(typeof(XmlColumnProperties))]
[ChildElementInfoAttribute(typeof(ExtensionList))]
public class TableColumn : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • CalculatedColumnFormula <x:calculatedColumnFormula>

  • TotalsRowFormula <x:totalsRowFormula>

  • XmlColumnProperties <x:xmlColumnPr>

  • ExtensionList <x:extLst>

[ISO/IEC 29500-1 1st Edition]

18.5.1.3 tableColumn (Table Column)

An element representing a single column for this table.

Parent Elements

tableColumns (§18.5.1.4)

Child Elements

Subclause

calculatedColumnFormula (Calculated Column Formula)

§18.5.1.1

extLst (Future Feature Data Storage Area)

§18.2.10

totalsRowFormula (Totals Row Formula)

§18.5.1.6

xmlColumnPr (XML Column Properties)

§18.5.1.7

Attributes

Description

dataCellStyle (Data Area Style Name)

A string representing the name of the cell style that is applied to the cells in the data area of this table column.

If this string is missing or does not correspond to the name of a cell style, then the data cell style specified by the current table style should be applied.

This cell style should get precedence over the dataCellStyle defined by the table.

The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19).

dataDxfId (Data & Insert Row Format Id)

A zero based integer index into the differential formatting records <dxfs> in the styleSheet indicating which format to apply to the data area of this column. This formatting shall also apply to cells on the insert row for this column.

The spreadsheet should fail to load if this index is out of bounds.

The possible values for this attribute are defined by the ST_DxfId simple type (§18.18.25).

headerRowCellStyle (Header Row Cell Style)

A string representing the name of the cell style that is applied to the header row cell of this column.

If this string is missing or does not correspond to the name of a cell style, then header row style specified by the current table style should be applied.

This cell style should get precedence over the headerRowCellStyle defined by the table.

The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19).

headerRowDxfId (Header Row Cell Format Id)

A zero based integer index into the differential formatting records <dxfs> in the styleSheet indicating which format to apply to the header cell of this column.

The possible values for this attribute are defined by the ST_DxfId simple type (§18.18.25).

id (Table Field Id)

An integer representing the unique identifier of this column. This shall be unique per table.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.

name (Column name)

A string representing the unique caption of the table column. This is what shall be displayed in the header row in the UI, and is referenced through functions. This name shall be unique per table.

The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19).

queryTableFieldId (Query Table Field Id)

An integer representing the query table field ID corresponding to this table column.

The relationship between this table and the corresponding query table is expressed in _rels part for this table. Each queryTableField has a unique id attribute, and this id is what is referenced here.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.

totalsRowCellStyle (Totals Row Style Name)

A string representing the name of the cell style that is applied to the Totals Row cell of this column.

If this string is missing or does not correspond to the name of a cell style, then the totals row cell style specified by the current table style should be applied.

This cell style should get precedence over the totalsRowCellStyle defined by the table.

The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19).

totalsRowDxfId (Totals Row Format Id)

A zero based integer index into the differential formatting records <dxfs> in the styleSheet indicating which format to apply to the totals row cell of this column.

The spreadsheet shall not load if this index is out of bounds.

The possible values for this attribute are defined by the ST_DxfId simple type (§18.18.25).

totalsRowFunction (Totals Row Function)

An enumeration indicating which type of aggregation to show in the totals row cell for this column.

The possible values for this attribute are defined by the ST_TotalsRowFunction simple type (§18.18.83).

totalsRowLabel (Totals Row Label)

A String to show in the totals row cell for this column.

This string shall be ignored unless the totalsRowFunction="none" for this column, in which case it is displayed in the totals row.

The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19).

uniqueName (Unique Name)

An optional string representing the unique name of the table column. This string is used to bind the column to a field in a data table, so it should only be used when this table's tableType is queryTable or xml.

This name shall be unique per table when it is used.

For tables created from xml mappings, by default this should be the same as the name of the column, and should be kept in synch with the name of the column if that name is altered by the spreadsheet application.

The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19).

[Note: The W3C XML Schema definition of this element’s content model (CT_TableColumn) is located in §A.2. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

TableColumn Members

DocumentFormat.OpenXml.Spreadsheet Namespace