<queryTable> (Query Table)

This element specifies all the relevant properties for a query table, one query table element is stored for each query table object in the spreadsheetML document.

Parent Elements

Root element of SpreadsheetML Query Table part

Child Elements

Subclause

<extLst> (Future Feature Data Storage Area)

§3.2.10

<queryTableRefresh> (QueryTable Refresh Information)

§3.12.6

Attributes

Description

<adjustColumnWidth> (Adjust Column Width On Refresh)

Specifies whether to automatically adjust column widths on refresh to fit the data retrieved. true if column widths should be adjusted.

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

<applyAlignmentFormats> (Apply Alignment Formats)

If true apply legacy table autoformat alignment properties.

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

<applyBorderFormats> (Apply Border Formats)

If true apply legacy table autoformat border properties.

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

<applyFontFormats> (Apply Font Formats)

If true apply legacy table autoformat font properties.

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

<applyNumberFormats> (Apply Number Formats)

If true apply legacy table autoformat number format properties.

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

<applyPatternFormats> (Apply Pattern Formats)

If true apply legacy table autoformat pattern properties.

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

<applyWidthHeightFormats> (Apply Width / Height Formats)

If true apply legacy table autoformat width/height properties.

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

<autoFormatId> (Auto Format Id)

Identifies which legacy table autoformat to apply.

Here are representations of the supported table autoformats:

autoFormatId

Description

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

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

<backgroundRefresh> (Background Refresh)

Specifies whether or not the query table shall try to refresh data in the background.

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

<connectionId> (Connection Id)

Specifies the ID number of the external data connection< >to use to refresh data in the query table.

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

<disableEdit> (Disable Edit)

Specifies whether the <connection >element< > used with this query table shall be editable. If true, then the connection is not editable.

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

<disableRefresh> (Disable Refresh)

Specifies whether the query table shall be refreshable. If true, then then query table is not refreshable.

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

<fillFormulas> (Fill Adjacent Formulas)

Specifies whether or not formulas in columns adjacent to the query table should be filled down whenever the query table is refreshed. This is helpful since the number of rows returned by a query table refresh operation can vary.

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

<firstBackgroundRefresh> (First Background Refresh)

Specifies whether or not data has ever been refreshed for this query table. If the very first background data refresh had not completed at the time the file was saved, this attribute will be set to true.

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

<growShrinkType> (Grow Shrink Type)

Specifies the type of behavior expected for dealing with a variable number of rows of data in the query table between refresh operations.

The meaning of the possible values of this attribute {insertClear<, >insertDelete<, >overwriteClear<}> are explained in detail in the definition of the simple type.

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

<headers> (First Row Column Titles)

Specifies whether or not the query table has first row with column titles.

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

<intermediate> (Intermediate)

Specifies whether this query table is in an intermediate state, having been defined but not fully formed and populated with data.

In this state, fields and ranges of the query table may be unknown.

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

<name> (QueryTable Name)

Specifies the name of the query table.

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

<preserveFormatting> (Preserve Formatting On Refresh)

Specifies whether the application should try to preserve formatting in the query table and copy this formatting to any new rows of data.

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

<refreshOnLoad> (Refresh On Load)

Specifies whether the query table shall refresh its data automatically when the spreadsheetML document is loaded or opened.

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

<removeDataOnSave> (Remove Data On Save)

Specifies whether the query table shall remove all data from the worksheet before the spreadsheetML document is saved.

Note: this is very helpful for situations where people who have different permissions to view data want to share the same spreadsheetML document. All data from the last user will be removed, and new users re-query the external data sources with their own credentials.

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

<rowNumbers> (Row Numbers)

Specifies whether the query table shall include a first column of row numbers.

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_QueryTable">
	<sequence>
	<element name="queryTableRefresh" type="CT_QueryTableRefresh" minOccurs="0" maxOccurs="1"/>
	<element name="extLst" type="CT_ExtensionList" minOccurs="0" maxOccurs="1"/>
	</sequence>
	<attribute name="name" type="ST_Xstring" use="required"/>
	<attribute name="headers" type="xsd:boolean" use="optional" default="true"/>
	<attribute name="rowNumbers" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="disableRefresh" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="backgroundRefresh" type="xsd:boolean" use="optional" default="true"/>
	<attribute name="firstBackgroundRefresh" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="refreshOnLoad" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="growShrinkType" type="ST_GrowShrinkType" use="optional" default="insertDelete"/>
	<attribute name="fillFormulas" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="removeDataOnSave" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="disableEdit" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="preserveFormatting" type="xsd:boolean" use="optional" default="true"/>
	<attribute name="adjustColumnWidth" type="xsd:boolean" use="optional" default="true"/>
	<attribute name="intermediate" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="connectionId" type="xsd:unsignedInt" use="required"/>
	<attributeGroup ref="AG_AutoFormat"/>
</complexType>