Ilia Zub Web developer

Excel XML Spreadsheet example

Solved errors

Problem During Load because of wrong ss:ExpandedRowCount.

If this value is out-of-sync with the table, the specified XML Spreadsheet document is invalid.

Check out XML Spreadsheet Reference for details.

Problem During Load because of empty rows and cells. Check out Table options.

Excel not enough available memory or disk space available, because Content-Type header was set to application/vnd.ms-excel. Change Content-Type to application/xml.

Styling

Fonts

<Style ss:ID="Bold">
  <Font ss:Bold="1"/>
</Style>

Formatting

<Style ss:ID="Fixed">
  <NumberFormat ss:Format="Standard"/>
</Style>

Applying styles

<Row ss:StyleID="Bold">
  <Cell ss:StyleID="Fixed"><Data ss:Type="Number">14.2201672241793</Cell>
</Row>

Formulas

Excel RC absolute reference

ss:Formula="=SUM(R2C:R[-2]C)", where R — Row, C — Column

Example

<Row>
  <Cell ss:StyleID="Bold"><Data ss:Type="String">Total:</Data></Cell>
  <Cell ss:StyleID="Fixed" ss:Formula="=SUM(R2C:R[-2]C)"><Data ss:Type="Number"></Data></Cell>
</Row>

Table options

Columns index

Usage: ss:Index="<value>"

Example: xml <Cell ss:Index="4"><Data ss:Type="Number">73</Data></Cell>

Empty rows

<Row>
  <Cell ss:Index="4"/>
</Row>

XML Spreadsheet Reference