<table> (Table)

This element is the root element for a table that is not a single cell XML table.

Parent Elements

Root element of SpreadsheetML Table Definitions part

Child Elements

Subclause

<autoFilter> (AutoFilter Settings)

§3.3.1.1

<extLst> (Future Feature Data Storage Area)

§3.2.10

<sortState> (Sort State)

§3.3.1.89

<tableColumns> (Table Columns)

§3.5.1.4

<tableStyleInfo> (Table Style)

§3.5.1.5

Attributes

Description

<comment> (Table Comment)

A string representing a textual comment about the table.

Note: this can be used by the spreadsheet application in other UI. For example, there may be name UI that is used to organize defined names and function references, if tables are listed in that UI the comment can give more information about the table.

The maximum length of this string should be 32767 characters.

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

<connectionId> (Connection ID)

An integer representing an ID to indicate which connection from the connections collection is used by this table.

This shall only be used for tables that are based off of xml maps.

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

<dataCellStyle> (Data Style Name)

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

If this string is missing or invalid, then the data cell style specified by the current table style should be applied.

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

<dataDxfId> (Data Area 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 table.

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 (§3.18.26).

<displayName> (Table Name)

A string representing the name of the table. This is the name that shall be used in formula references, and displayed in the UI to the spreadsheet user.

This name shall not have any spaces in it, and it must be unique amongst all other displayNames and definedNames in the workbook. The character lengths and restrictions are the same as for definedNames. See SpreadsheetML Reference - Workbook definedNames section for details

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

<headerRowBorderDxfId> (Header Row Border Format Id)

A zero based integer index into the differential formatting records <dxfs> in the styleSheet indicating what border formatting to apply to the header row of this table.

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 (§3.18.26).

<headerRowCellStyle> (Header Row Style)

A string representing the name of the cell style that is applied to the header row cells of the table.

If this string is missing or invalid, then the header row style specified by the current table style should be applied.

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

<headerRowCount> (Header Row Count)

An integer representing the number of header rows showing at the top of the table. 0 means that the header row is not shown.

It is up to the spreadsheet application to determine if numbers greater than 1 are allowed. Unless the spreadsheet application has a feature where there may ever be more than one header row, this number should not be higher than 1.

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

<headerRowDxfId> (Header Row Format Id)

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

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 (§3.18.26).

<id> (Table Id)

A non zero integer representing the unique identifier for this table. Each table in the workbook shall have a unique id.

Note: Ids can be used to refer to the specific table in the workbook. For instance a future records bucket could refer to the table using this id.

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

<insertRow> (Insert Row Showing)

A Boolean value indicating whether the insert row is showing. True when the insert row is showing, false otherwise.

The insert row should only be shown if the table has no data.

Note: When a user clicks the insert row in the UI, it provides them an easy way to enter data into a table.

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

<insertRowShift> (Insert Row Shift)

A Boolean that indicates whether cells in the sheet had to be inserted when the insert row was shown for this table. True if the cells were shifted, false otherwise.

Note: This happens when there are values in cells immediately below the table when the table is created and the insert row is shown. In this case blank cells for the insert row are inserted, and the existing values in the sheet are shifted down by one row to make room.

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

<name> (Name)

A string representing the name of the table that is used to reference the table programmatically through the spreadsheet applications object model. This string shall be unique per table per sheet. It has the same length and character restrictions as for @displayName.

By default this should be the same as the table's displayName. This name should also be kept in synch with the displayName when the displayName is updated in the UI by the spreadsheet user.

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

<published> (Published)

A Boolean representing whether this table is marked as published for viewing by a server based spreadsheet application. True if it should be viewed by the server spreadsheet application, false otherwise.

Note: Such an application might only display objects from the workbook that are marked as published, thus being able to load and calculate the entire workbook but only show the specific items that are marked as published. This can allow the server spreadsheet rendering to provide a more restricted view of the workbook.

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

<ref> (Reference)

The range on the relevant sheet that the table occupies expressed using A1 style referencing.

The reference shall include the totals row if it is shown.

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

<tableBorderDxfId> (Table Border Format Id)

A zero based integer index into the differential formatting records <<dxfs>> in the styleSheet indicating what border formatting to apply to the borders of this table.

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 (§3.18.26).

<tableType> (Table Type)

An optional enumeration specifying the type or source of the table.

Indicates whether the table is based off of an external data query, data in a worksheet, or from an xml data mapped to a worksheet.

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

<totalsRowBorderDxfId> (Totals Row Border Format Id)

A zero based integer index into the differential formatting records <<dxfs>> in the styleSheet indicating what border formatting to apply to the totals row of this table.

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 (§3.18.26).

<totalsRowCellStyle> (Totals Row Style)

A string representing the name of the cell style that is applied to the totals row cells of the table.

If this string is missing or invalid, then the totals row style specified by the current table style should be applied.

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

<totalsRowCount> (Totals Row Count)

An integer representing the number of totals rows that shall be shown at the bottom of the table.

0 means that the totals row is not shown. It is up to the spreadsheet application to determine if numbers greater than 1 are allowed. Unless the spreadsheet application has a feature where they may ever be more than one totals row, this number should not be higher than 1.

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

<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 of this table.

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 (§3.18.26).

<totalsRowShown> (Totals Row Shown)

A Boolean indicating whether the totals row has ever been shown in the past for this table. True if the totals row has been shown, false otherwise.

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

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Table">
	<sequence>
	<element name="autoFilter" type="CT_AutoFilter" minOccurs="0" maxOccurs="1"/>
	<element name="sortState" type="CT_SortState" minOccurs="0" maxOccurs="1"/>
	<element name="tableColumns" type="CT_TableColumns" minOccurs="1" maxOccurs="1"/>
	<element name="tableStyleInfo" type="CT_TableStyleInfo" minOccurs="0" maxOccurs="1"/>
	<element name="extLst" type="CT_ExtensionList" minOccurs="0" maxOccurs="1"/>
	</sequence>
	<attribute name="id" type="xsd:unsignedInt" use="required"/>
	<attribute name="name" type="ST_Xstring" use="optional"/>
	<attribute name="displayName" type="ST_Xstring" use="required"/>
	<attribute name="comment" type="ST_Xstring" use="optional"/>
	<attribute name="ref" type="ST_Ref" use="required"/>
	<attribute name="tableType" type="ST_TableType" use="optional" default="worksheet"/>
	<attribute name="headerRowCount" type="xsd:unsignedInt" use="optional" default="1"/>
	<attribute name="insertRow" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="insertRowShift" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="totalsRowCount" type="xsd:unsignedInt" use="optional" default="0"/>
	<attribute name="totalsRowShown" type="xsd:boolean" use="optional" default="true"/>
	<attribute name="published" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="headerRowDxfId" type="ST_DxfId" use="optional"/>
	<attribute name="dataDxfId" type="ST_DxfId" use="optional"/>
	<attribute name="totalsRowDxfId" type="ST_DxfId" use="optional"/>
	<attribute name="headerRowBorderDxfId" type="ST_DxfId" use="optional"/>
	<attribute name="tableBorderDxfId" type="ST_DxfId" use="optional"/>
	<attribute name="totalsRowBorderDxfId" type="ST_DxfId" use="optional"/>
	<attribute name="headerRowCellStyle" type="ST_Xstring" use="optional"/>
	<attribute name="dataCellStyle" type="ST_Xstring" use="optional"/>
	<attribute name="totalsRowCellStyle" type="ST_Xstring" use="optional"/>
	<attribute name="connectionId" type="xsd:unsignedInt" use="optional"/>
</complexType>