The Table XML

The only difference with table definitions that are bound to XML is that @tableType="xml" and each column has an additional set of xml-specific properties, contained in the <xmlColumnPr> collection, which appears once for every column in the Table which has an XML data binding.

<table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/5/main" id="7" name="Table7" displayName="Table7" ref="B8:G12" tableType="xml" totalsRowShown="0" connectionId="1">
    <autoFilter ref="B8:G12"/>
    <tableColumns count="6">
        <tableColumn id="1" uniqueName="type" name="type">
            <xmlColumnPr mapId="1" xpath="/expense-report/expense-item/@type" xmlDataType="string"/>
        </tableColumn>
        <tableColumn id="2" uniqueName="expto" name="expto">
            <xmlColumnPr mapId="1" xpath="/expense-report/expense-item/@expto" xmlDataType="string"/>
        </tableColumn>
        <tableColumn id="3" uniqueName="Date" name="Date">
            <xmlColumnPr mapId="1" xpath="/expense-report/expense-item/Date" xmlDataType="date"/>
        </tableColumn>
        <tableColumn id="4" uniqueName="expense" name="expense">
            <xmlColumnPr mapId="1" xpath="/expense-report/expense-item/expense" xmlDataType="double"/>
        </tableColumn>
        <tableColumn id="5" uniqueName="description" name="description">
            <xmlColumnPr mapId="1" xpath="/expense-report/expense-item/description" xmlDataType="string"/>
        </tableColumn>
        <tableColumn id="6" uniqueName="misctype" name="misctype">
            <xmlColumnPr mapId="1" xpath="/expense-report/expense-item/Misc/@misctype" xmlDataType="string"/>
        </tableColumn>
    </tableColumns>
    <tableStyleInfo name="TableStyleMedium7" showFirstColumn="0" showLastColumn="0" showRowStripes="1" showColumnStripes="0"/>
</table>

The column in the Table titled "type" is bound to an XML mapping, whose map object Id @mapId is "1". The @xpath value indicates an xpath expression to which this Table column is associated. In this example the Table column "type" corresponds to @type, which is an attribute of the <expense-item> collection. The corresponding custom schema definition for @type indicates a data type of string. This is stored as an xml column property as well, in @xmlDataType. This is used for interpreting the data on import and export, and is also used to format the cells for proper rendering in the range.

The remaining columns have similar properties set and can be understood from the discussion above.