This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Michael Stowe
Microsoft Corporation
August 2001
Applies to:
Microsoft® Excel 2002
Microsoft® Office XP Web Components Spreadsheet Component
Summary: This reference describes the elements and attributes that make up the XML Spreadsheet (XMLSS) schema when the data in Microsoft Excel 2002 spreadsheets and Microsoft Office XP Spreadsheet Components is exported to the Extensible Markup Language (XML) format. (53 printed pages)
Contents
How to Use This Reference
XML Spreadsheet Tag Hierarchy
<B> Tag
<c:ComponentOptions> Tag
<c:DisplayCustomHeaders> Tag
<c:HideOfficeLogo> Tag
<c:Toolbar> Tag
<c:WorksheetOptions> Tag
<Font> Tag
<I> Tag
<o:SmartTags> Tag
<o:SmartTagType> Tag
<S> Tag
<Span> Tag
<ss:Alignment> Tag
<ss:Border> Tag
<ss:Borders> Tag
<ss:Cell> Tag
<ss:Column> Tag
<ss:Comment> Tag
<ss:Data> Tag
<ss:Font> Tag
<ss:Interior> Tag
<ss:NamedCell> Tag
<ss:NamedRange> Tag
<ss:Names> Tag
<ss:NumberFormat> Tag
<ss:Protection> Tag
<ss:Row> Tag
<ss:Style> Tag
<ss:Styles> Tag
<ss:Table> Tag
<ss:Workbook> Tag
<ss:Worksheet> Tag
<stN:SmartTag> Tag
<Sub> Tag
<Sup> Tag
<U> Tag
<x:AutoFilter> Tag
<x:AutoFilterAnd> Tag
<x:AutoFilterColumn> Tag
<x:AutoFilterCondition> Tag
<x:AutoFilterOr> Tag
<x:Footer> Tag
<x:Header> Tag
<x:Layout> Tag
<x:PageMargins> Tag
<x:PageSetup> Tag
<x:PhoneticText> Tag
<x:WorksheetOptions> Tag
How to Use This Reference
To use this reference, click on the hyperlinked tag you're interested in as listed in the Contents section above. The easiest way to see how these tags relate to each other is to export the data in a Microsoft® Excel 2002 spreadsheet or Microsoft® Office XP Spreadsheet Component to the XML Spreadsheet (XMLSS) format and cross-reference the output against the tags listed here.
To save the data from an Excel 2002 spreadsheet in the XMLSS format, on the File menu, click Save As. In the Save As list, click XML Spreadsheet (*.xml). Type a file name into the File name list, and then click Save. Then open the XML file in Microsoft® Internet Explorer 5 or later to examine the XMLSS output.
To save the data from an Office XP Spreadsheet Component in the XMLSS format, click the Export to Microsoft Excel button on the Spreadsheet Component's toolbar, and then follow the directions above to save the Excel 2002 spreadsheet's contents as XML.
XML Spreadsheet Tag Hierarchy
The hierarchy of tags in the XML Spreadsheet model is as follows:
Specifies a change to bold within an Excel rich-text data stream.
<c:ComponentOptions> Tag
Used by:
Spreadsheet component only
Parent element:
ss:Workbook
Required elements:
(none)
Optional elements:
c:Toolbar
Required attributes:
(none)
Optional attributes:
(none)
Description
This element contains information that is unique to the Spreadsheet component. Excel does not need to read or understand this information.
<c:DisplayCustomHeaders> Tag
Used by:
Spreadsheet component only
Parent element:
c:WorksheetOptions
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
(none)
Description
Presence of this element indicates that the Spreadsheet component should display custom row and column headers for this sheet, rather than the default "A, B, C..." and "1, 2, 3..." style row and column headers.
<c:HideOfficeLogo> Tag
Used by:
Spreadsheet component only
Parent element:
c:Toolbar
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
(none)
Description
Presence of this element indicates that the Office logo should be hidden. The default state is to show the Office logo, hence the name HideOfficeLogo.
<c:Toolbar> Tag
Used by:
Spreadsheet component only
Parent element:
c:ComponentOptions
Required elements:
(none)
Optional elements:
c:HideOfficeLogo
Required attributes:
(none)
Optional attributes:
ss:Hidden
Description
This element contains information about the state of the Spreadsheet Component's toolbar.
Optional Attributes
Attribute:
ss:Hidden
Description:
True specifies that the spreadsheet component's toolbar is hidden. False (or omitted) specifies that it is visible.
Type:
Boolean
<c:WorksheetOptions> Tag
Used by:
Spreadsheet component only
Parent element:
ss:Worksheet
Required elements:
(none)
Optional elements:
c:DisplayCustomHeaders
Required attributes:
(none)
Optional attributes:
(none)
Description
This element contains worksheet options that are specific to the Spreadsheet component.
<Font> Tag
Used by:
Excel only
Parent element:
ss:Data
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
x:Color
Description
Specifies a font change within an Excel rich-text data stream.
Optional Attributes
Attribute:
x:Color
Description:
Specifies the font color to use.
Type:
String
Default:
0
<I> Tag
Used by:
Excel only
Parent element:
ss:Data
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
(none)
Description
Specifies a change to italic within an Excel rich-text data stream.
<o:SmartTags> Tag
Used by:
Excel only
Parent element:
ss:Cell
Required elements:
(none)
Optional elements:
stN:SmartTag
Required attributes:
(none)
Optional attributes:
(none)
Description
A collection of SmartTag tags, each of which denote single instances of a smart tag on a cell.
The child tags of this collection have namespaces that have been defined at both the top of the document per XML standards and with SmartTagType. stN (for example, st1, st2) is the common local alias for these namespaces. For example, if a smart tag type is defined with a namespace of "urn:mycompany-com" and a name of "bar", expect child tags called "<st1:bar>" where st1 refers to the urn:mycompany-com namespace.
To add smart tags to your workbook, go to the Smart Tags tab (AutoCorrect dialog box, Tools menu) and check all the boxes. Smart tags are not available in the Spreadsheet component.
<o:SmartTagType> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Workbook
Required elements:
(none)
Optional elements:
(none)
Required attributes:
o:name, o:namespaceuri
Optional attributes:
(none)
Description
Defines a smart tag type category that is used within this workbook. A smart tag type is fully defined by both a namespace and a tag name; this is what smart tag actions register to provide actions for, and what smart tag recognizers pass to the applications as annotations.
To add smart tags to your workbook, go to the Smart Tags tab (AutoCorrect dialog box, Tools menu) and check all of the boxes. Smart tags are not available in the Spreadsheet component.
Required Attributes
Attribute:
o:name
Description:
The tag name that this smart tag type is using.
Type:
String
Attribute:
o:namespaceuri
Description:
The namespace that this smart tag type is associated with.
Type:
String
<S> Tag
Used by:
Excel only
Parent element:
ss:Data
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
(none)
Description
Specifies a change to strikethrough within an Excel rich-text data stream.
<Span> Tag
Used by:
Excel only
Parent element:
ss:Data
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
(none)
Description
This element is used to save outline formatting, for example: <Span ss:Style="text-effect:outline">.
Defines the font alignment attributes to use in this style. Each attribute that is specified is considered an override from the default.
Optional Attributes
Attribute:
ss:Horizontal
Description:
Specifies the left-to-right alignment of text within a cell. The Spreadsheet component does not support CenterAcrossSelection, Fill, Justify, Distributed, and JustifyDistributed.
Type:
Enumeration—Automatic, Left, Center, Right, Fill, Justify, CenterAcrossSelection, Distributed, and JustifyDistributed
Default:
Automatic
Attribute:
ss:Indent
Description:
Specifies the number of indents. This attribute is not supported by the Spreadsheet component.
Type:
Unsigned Long
Default:
0
Attribute:
ss:ReadingOrder
Description:
Specifies the default right-to-left text entry mode for a cell. The Spreadsheet component does not support Context.
Type:
Enumeration—RightToLeft, LeftToRight, and Context
Default:
Context
Attribute:
ss:Rotate
Description:
Specifies the rotation of the text within the cell. 90 is straight up, 0 is horizontal, and -90 is straight down. The Spreadsheet component does not support this attribute.
Type:
Double
Default:
0
Attribute:
ss:ShrinkToFit
Description:
True means that the text size should be shrunk so that all of the text fits within the cell. False means that the font within the cell should behave normally. The Spreadsheet component does not support this attribute.
Type:
Boolean
Default:
0 (False)
Attribute:
ss:Vertical
Description:
Specifies the top-to-bottom alignment of text within a cell. Distributed and JustifyDistributed are only legitimate values when ss:VerticalText is True. The Spreadsheet component does not support Justify, Distributed, or JustifyDistributed.
Type:
Enumeration—Automatic, Top, Bottom, Center, Justify, Distributed, and JustifyDistributed
Default:
Automatic
Attribute:
ss:VerticalText
Description:
Specifies whether the text is drawn "downwards", whereby each letter is drawn horizontally, one above the other. The Spreadsheet component does not support this attribute.
Type:
Boolean
Default:
0 (False)
Attribute:
ss:WrapText
Description:
Specifies whether the text in this cell should wrap at the cell boundary. False means that text either spills or gets truncated at the cell boundary (depending on whether the adjacent cell(s) have content). The Spreadsheet component does not support this attribute.
Type:
Boolean
Default:
0 (False)
<ss:Border> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Borders
Required elements:
(none)
Optional elements:
(none)
Required attributes:
ss:Position
Optional attributes:
ss:Color, ss:LineStyle, ss:Weight
Description
Defines a single border within this style's Borders collection. The Borders collection may contain up to six unique Border elements. If duplicate Border elements exist, the behavior is unspecified and the XML Spreadsheet document is considered invalid.
Required Attributes
Attribute:
ss:Position
Description:
Specifies which of the six possible borders this element represents. Duplicate borders are not permitted and are considered invalid. The Spreadsheet component does not support DiagonalLeft or DiagonalRight.
Type:
Enumeration—Left, Top, Right, Bottom, DiagonalLeft, and DiagonalRight
Optional Attributes
Attribute:
ss:Color
Description:
Specifies the color of this border. This value can be either a 6-hexadecimal digit number in "#rrggbb" format or it can be any of the Microsoft® Internet Explorer named colors (including the named Microsoft Windows® colors). This string can also be the special value of "Automatic." This string is case insensitive.
Type:
String
Default:
Automatic
Attribute:
ss:LineStyle
Description:
Specifies the appearance of this border. The Spreadsheet component does not support SlantDashDot and Double.
Type:
Enumeration—None, Continuous, Dash, Dot, DashDot, DashDotDot, SlantDashDot, and Double
Default:
None
Attribute:
ss:Weight
Description:
Specifies the weight (or thickness) of this border. This measurement is specified in points, and the following values map to Excel:
0—Hairline
1—Thin
2—Medium
3—Thick
Type:
Double
Default:
0
<ss:Borders> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Style
Required elements:
(none)
Optional elements:
ss:Border
Required attributes:
(none)
Optional attributes:
(none)
Description
Defines the border properties for cells referencing this style. The Borders element contains no attributes; it is purely a container for individual Border elements.
Component only. Specifies the absolute formula stored in this cell when a copy/paste occurs within the component. All formulas are persisted in R1C1 notation because they are significantly easier to parse and generate than A1-style formulas. This attribute is specified whenever a user copies a range of data with formulas. By default, formula is not written if it refers to a cell out of the copy range.
Type:
String
Attribute:
ss:ArrayRange
Description:
Specifies the range of cells onto which we apply an array formula. When an array formula is specified, only the top-left cell contains an ArrayRange and Formula attribute. Other cells in the range do not contain ArrayRange or Formula. This reference may be any valid reference as long as the ss:ArrayRange attribute appears in the top-left corner of the array. For example, this means if I have an array in cells A1:B2, A1 must have the ArrayRange attribute, but the specified range reference could be B1:A2.
Specifies the formula stored in this cell. All formulas are persisted in R1C1 notation because they are significantly easier to parse and generate than A1-style formulas. The formula is calculated upon reload unless calculation is set to manual. Recalculation of the formula overrides the value in this cell's Value attribute.
Type:
String
Attribute:
ss:HRef
Description:
Specifies the URL to which to link this cell. The cell's <Value> <Data> element displays the content to show on-screen.
Type:
String
Attribute:
ss:Index
Description:
Specifies the column index of this cell within the containing row. If this tag is not specified, the first instance of a Cell element within a row has an assumed Index="1". Each additional Cell element has an assumed Index that is one higher.
Indices must appear in strictly increasing order. Failure to do so will result in an XML Spreadsheet document that is invalid. Indices do not need to be sequential, however. Omitted indices are formatted with either the default format, the column's format, or the table's format (depending on what has been specified).
Indices must not overlap. If duplicates exist, the behavior is unspecified and the XML Spreadsheet document is considered invalid.
If the previous cell is a merged cell and no index is specified on this cell, its start index is assumed to be the first cell after the merge.
Type:
Unsigned Long
Attribute:
ss:MergeAcross
Description:
Specifies the number of adjacent cells across (right unless in right-to-left mode) from the current cell to merge.
As mentioned above, indices must not overlap. If duplicates exist, the behavior is unspecified and the XML Spreadsheet document is considered invalid. One way for overlap to occur is careless use of the MergeAcross attribute. Care must be taken with this attribute to ensure that the merge does not include another cell index in the merged range.
This count excludes the current cell. So, if a cell is not merged, the MergeDown="0" and MergeAcross="0".
Type:
Unsigned Long
Default:
0
Attribute:
ss:MergeDown
Description:
Specifies the number of adjacent cells below the current cell to merge.
As mentioned above, indices must not overlap. If duplicates exist, the behavior is unspecified and the XML Spreadsheet document is considered invalid. One way for overlap to occur is careless use of the MergeDown attribute. Care must be taken with this attribute to ensure that the merge does not include another cell index in the merged range.
This count excludes the current cell. So, if a cell is not merged, the MergeDown="0" and MergeAcross="0".
Type:
Unsigned Long
Default:
0
Attribute:
ss:StyleID
Description:
Specifies a reference to a previously defined ID attribute in a Style tag. This reference indicates that this Style should be used to format this element. If this attribute is not present, the default Style should applied to this element.
Type:
ID Reference
Attribute:
x:HRefScreenTip
Description:
Specifies the ToolTip's content to display when the user hovers over this cell's ToolTip. The Spreadsheet component does not support this attribute.
Defines the formatting for one or more adjacent columns. This element contains no data; all cell data is stored within Row elements. All ss:Column elements must appear before the first ss:Row element, otherwise unexpected behavior may occur.
Optional Attributes
Attribute:
c:Caption
Description:
Specifies the caption that should appear when the Component's custom row and column headers are showing.
Type:
String
Attribute:
ss:AutoFitWidth
Description:
If this attribute is specified as True ("1"), it means that this column should be autosized for numeric and date values only. We do not autofit textual values.
If both ss:Width and ss:AutoFitWidth exist, the behavior is as follows:
ss:AutoFitWidth="1" and ss:Width is unspecified: Autofit the column width to fit the content.
ss:AutoFitWidth="1" and ss:Width is specified: Set the column to the specified width and only autofit if the size of the content is larger than the specified width.
ss:AutoFitWidth="0" and ss:Width is unspecified: Use the default column width.
ss:AutoFitWidth="0" and ss:Width is specified: Use the specified width.
Type:
Boolean
Default:
1 (True)
Attribute:
ss:Hidden
Description:
True specifies that this column is hidden. False (or omitted) specifies that this column is shown.
Type:
Boolean
Attribute:
ss:Index
Description:
Specifies the position of this column within the table.
If this tag is not specified, the first instance has an assumed Index="1". Each additional Column element has an assumed Index that is one higher.
Indices must appear in strictly increasing order. Failure to do so will result in an XML Spreadsheet document that is invalid. Indices do not need to be sequential, however. Omitted indices are formatted with the default style's format.
Indices must not overlap. If duplicates exist, the behavior is unspecified and the XML Spreadsheet document is considered invalid. An easy way to create overlap is through careless use of the Span attribute.
Type:
Unsigned Long
Attribute:
ss:Span
Description:
Specifies the number of adjacent columns with the same formatting as this column. When a Span attribute is used, the spanned column elements are not written out.
As mentioned in the Index tag, columns must not overlap. Doing so results in an XML Spreadsheet document that is invalid. Care must be taken with this attribute to ensure that the span does not include another column index that is specified.
Type:
Unsigned Long
Attribute:
ss:StyleID
Description:
Specifies a reference to a previously defined ID attribute in a Style tag. This reference indicates that this Style should be used to format this element. If this attribute is not present, the default Style should be applied to this element.
Type:
ID Reference
Attribute:
ss:Width
Description:
Specifies the width of a column in points. This value must be greater than or equal to 0.
Type:
Double
<ss:Comment> Tag
Used by:
Excel only
Parent element:
ss:Cell
Required elements:
ss:Data
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
ss:Author, ss:ShowAlways
Description
Contains the comment to be associated with this cell.
Optional Attributes
Attribute:
ss:Author
Description:
Specifies the author of this comment.
Type:
String
Attribute:
ss:ShowAlways
Description:
Specifies whether this comment is displayed regardless of whether the user is hovering over the cell or not.
Type:
Boolean
Default:
0 (False)
<ss:Data> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Cell, ss:Comment
Required elements:
(none)
Optional elements:
B, Font, I, S, Span, Sub, Sup, U
Required attributes:
ss:Type
Optional attributes:
x:Ticked
Description
Specifies the value of this cell. The value should be specified in the appropriate format based on the value of the cell's Type attribute. This element can also be used to specify a cell's comment.
<ss:Cell>
<ss:Data ss:Type="String" xmlns="http://www.w3.org/TR/REC-html40">
This is <B>Bold, <I>Bold Italic, </I></B><I>and Italic</I> text.</ss:Data>
</ss:Cell>
The Spreadsheet component will load rich-text and strip out the HTML elements. When saved, it will write a text-only version.
When the data is Rich Text, we only support well-formed XML tags (even though it may look like HTML).
Required Attributes
Attribute:
ss:Type
Description:
Specifies the data type of this tag's required Data element. With the exception of 'Error', the format of these data types are defined as "#NULL!, #DIV/0!, #VALUE!, #REF!, #NAME?, #NUM!, #N/A, #CIRC!". #CIRC! indicates that the current cell contains a circular reference. For applications with iteration (such as Excel), this error should be ignored, and the formula should be applied to the cell. The cell's value should be recalculated after loading. This attribute is not used when the data is inside the ss:Comment element; it is only used inside the ss:Data element.
Type:
Enumeration—Number, DateTime, Boolean, String, and Error
Optional Attributes
Attribute:
x:Ticked
Description:
When ss:Type is set to String, x:Ticked indicates the presence of a tick (') at the beginning of the data. When loading an XML Spreadsheet document, if x:Ticked is 1 (True) and ss:Type=String, the data in this cell should be prepended with a tick. When saving an XML Spreadsheet, if a tick is the first character in the data string, and ss:Type=String, the tick should be removed from the data string, and x:Ticked set to 1. This attribute is only used in conjunction with ss:Type=String. If this attribute appears in an XML Spreadsheet document when loading and ss:Type is not equal to String, ignore this attribute and continue loading.
Defines the font attributes to use in this style. Each attribute that is specified is considered an override from the default.
Optional Attributes
Attribute:
ss:Bold
Description:
Specifies the bold state of the font. If the parent style has Bold="1" and the child style wants to override the setting, it must explicitly set the value to Bold="0". If this attribute is not specified within an element, the default is assumed.
Type:
Boolean
Default:
0 (False)
Attribute:
ss:Color
Description:
Specifies the color of the font. This value can be either a 6-hexadecimal digit number in "#rrggbb" format or it can be any of the Internet Explorer named colors (including the named Windows colors). This string can also be special value of Automatic. This string is case insensitive. If this attribute is not specified within an element, the default is assumed.
Type:
String
Default:
Automatic
Attribute:
ss:FontName
Description:
Specifies the name of the font. This string is case insensitive. If this attribute is not specified within an element, the default is assumed.
Type:
String
Default:
Arial
Attribute:
ss:Italic
Description:
Similar to Bold in behavior, this attribute specifies the italic state of the font. If this attribute is not specified within an element, the default is assumed.
Type:
Boolean
Default:
0 (False)
Attribute:
ss:Outline
Description:
Similar to Bold in behavior, this attribute specifies whether the font is rendered as an outline. This property originates in Macintosh Office, and is not used on Windows. If this attribute is not specified within an element, the default is assumed. The Spreadsheet component does not support this attribute.
Type:
Boolean
Default:
0 (False)
Attribute:
ss:Shadow
Description:
Similar to Bold in behavior, this attribute specifies whether the font is shadowed. This property originates in Macintosh Office, and is not used on Windows. If this attribute is not specified within an element, the default is assumed. The Spreadsheet component does not support this attribute.
Type:
Boolean
Default:
0 (False)
Attribute:
ss:Size
Description:
Specifies the size of the font in points. This value must be strictly greater than 0. If this attribute is not specified within an element, the default is assumed.
Type:
Double
Default:
10
Attribute:
ss:StrikeThrough
Description:
Similar to Bold in behavior, this attribute specifies the strike-through state of the font. If this attribute is not specified within an element, the default is assumed. The Spreadsheet component does not support this attribute.
Type:
Boolean
Default:
0 (False)
Attribute:
ss:Underline
Description:
Specifies the underline state of the font. If the parent style is something other than None and a child style wants to override the value, it must explicitly reset the value. If this attribute is not specified within an element, the default is assumed.
Type:
Enumeration—None, Single, Double, SingleAccounting, and DoubleAccounting
Default:
None
Attribute:
ss:VerticalAlign
Description:
This attribute specifies the subscript or superscript state of the font. If this attribute is not specified within an element, the default is assumed. The Spreadsheet component does not support this attribute.
Type:
Enumeration—None, Subscript, and Superscript
Default:
None
Attribute:
x:CharSet
Description:
Win32-dependent character set value.
Type:
Unsigned Long
Default:
0
Attribute:
x:Family
Description:
Win32-dependent font family.
Type:
Enumeration—Automatic, Decorative, Modern, Roman, Script, and Swiss
Default:
Automatic
<ss:Interior> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Style
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
ss:Color, ss:Pattern, ss:PatternColor
Description
Defines the fill properties to use in this style. Each attribute that is specified is considered an override from the default.
Optional Attributes
Attribute:
ss:Color
Description:
Specifies the fill color of the cell. This value can be either a 6-hexadecimal digit number in "#rrggbb" format or it can be any of the Internet Explorer named colors (including the named Windows colors). This string can also be special value of Automatic. This string is case insensitive. If Pattern=Solid, this value is the fill color of the cell. Otherwise, the cell is filled with a blend of Color and PatternColor, with the Pattern attribute choosing the appearance.
Type:
String
Default:
Automatic
Attribute:
ss:Pattern
Description:
Specifies the fill pattern in the cell. The fill pattern determines how to blend the Color and PatternColor attributes to produce the cell's appearance. The Spreadsheet component does not support this attribute.
Specifies the secondary fill color of the cell when Pattern does not equal Solid. The Spreadsheet component does not support this attribute.
Type:
String
Default:
Automatic
<ss:NamedCell> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Cell
Required elements:
(none)
Optional elements:
(none)
Required attributes:
ss:Name
Optional attributes:
(none)
Description
Presence of this tag indicates that this cell is a member of a user-defined named range. When saved from Excel, this tag is only present on cells that are non-empty or contain formatting. This tag can appear multiple times (one for each user-defined name that this cell lies in).
Required Attributes
Attribute:
ss:Name
Description:
Specifies which user-defined named range this cell belongs to. This value should correspond to an ss:Name attribute of an ss:NamedRange tag. We do not need to validate that when this element exists, the cell it lies on is within the specified range. We do not need to verify that an ss:Cell exists for each cell in a specified named range.
Type:
String
<ss:NamedRange> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Names
Required elements:
(none)
Optional elements:
(none)
Required attributes:
ss:Name, ss:RefersTo
Optional attributes:
ss:Hidden
Description
Defines a single named range within this workbook.
Required Attributes
Attribute:
ss:Name
Description:
Specifies the name of this named range. This name must be unique within the list of named ranges and cannot contain spaces or resemble an R1C1-style reference.
Type:
String
Attribute:
ss:RefersTo
Description:
Specifies what this named range refers to. This should be an Excel-style formula.
Examples:
ss:RefersTo="=123"
ss:RefersTo="=123*Rate"
ss:RefersTo="=R1C1*10"
Type:
String
Optional Attributes
Attribute:
ss:Hidden
Description:
Specifies whether the name of a range is hidden from the user interface of the spreadsheet application.
Type:
Boolean
Default:
0 (False)
<ss:Names> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Workbook, ss:Worksheet
Required elements:
(none)
Optional elements:
ss:NamedRange
Required attributes:
(none)
Optional attributes:
(none)
Description
Defines the collection of named ranges within this workbook or worksheet. ss:NamedRange elements in the <ss:Workbook> collection require RefersTo attributes with an explicit SheetN! qualifier (for example, Sheet1!).
<ss:NumberFormat> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Style
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
ss:Format
Description
Defines the number format that should be in cells referencing this style. The default value is General, and all other number formats require a custom format code.
Optional Attributes
Attribute:
ss:Format
Description:
A number format code in the Excel number format syntax. This can also be one of the following values: General, General Number, General Date, Long Date, Medium Date, Short Date, Long Time, Medium Time, Short Time, Currency, Euro Currency, Fixed, Standard, Percent, Scientific, Yes/No, True/False, or On/Off. All special values are the same as the HTML number formats, with the exception of Currency and Euro Currency. Currency is the currency format with two decimal places and red text with parenthesis for negative values. Euro Currency is the same as Currency using the Euro currency symbol instead.
Type:
String
Default:
General
<ss:Protection> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Style
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
ss:Protected, x:HideFormula
Description
Defines the protection properties that should be used in cells referencing this style. This element exists as a short-hand way to apply protection to an entire table, row, or column, by simply adding it to a style.
The <ss:Protected> attribute of the <ss:Cell> element overrides a style's <ss:Protection> settings.
Optional Attributes
Attribute:
ss:Protected
Description:
This attribute indicates whether or not this cell is protected. When the worksheet is unprotected, cell-level protection has no effect. When a cell is protected, it will not allow the user to enter information into it.
Type:
Boolean
Default:
1 (True)
Attribute:
x:HideFormula
Description:
This attribute indicates whether or not this cell's formula should be hidden when worksheet protection is enabled.
Defines the formatting and data for one or more adjacent rows. If this element contains cell data, it must not contain the Span attribute. Each Row element may contain one or more Cell elements defining the table's data.
Optional Attributes
Attribute:
c:Caption
Description:
Specifies the caption that should appear when the component's custom row and column headers are showing.
Type:
String
Attribute:
ss:AutoFitHeight
Description:
If this attribute is True (1), it means that this row should be autosized. By default all rows are autofitted, so changing the size of the font in a cell will automatically resize a row.
If both ss:Height and ss:AutoFitHeight exist, the behavior is as follows:
ss:AutoFitHeight="1" and ss:Height is unspecified: Autofit the row height to fit the content.
ss:AutoFitHeight="1" and ss:Height is specified: Set the row to the specified height and only autofit if the size of the content is larger than the specified height.
ss:AutoFitHeight="0" and ss:Height is unspecified: Use the default row height.
ss:AutoFitHeight="0" and ss:Height is specified: Use the specified height.
Type:
Boolean
Default:
1 (True)
Attribute:
ss:Height
Description:
Specifies the height of a row in points. This value must be greater than or equal to 0.
Type:
Double
Attribute:
ss:Hidden
Description:
True specifies that this row is hidden. False (or omitted) specifies that this row is shown.
Type:
Boolean
Attribute:
ss:Index
Description:
Specifies the position of this row within the table. If this tag is not specified, the first instance has an assumed Index="1". Each additional Row element has an assumed Index that is one higher.
Indices must appear in strictly increasing order. Failure to do so will result in an XML Spreadsheet document that is invalid. Indices do not need to be sequential, however. Omitted indices are formatted with the default style's format.
Indices must not overlap. If duplicates exist, the behavior is unspecified, and the XML Spreadsheet document is considered invalid. An easy way to create overlap is through careless use of the Span attribute.
Type:
Unsigned Long
Attribute:
ss:Span
Description:
Specifies the number of adjacent rows with the same formatting as this row. When a Span attribute is used, the spanned row elements are not written out.
As mentioned in the Index tag, rows must not overlap. Doing so results in an XML Spreadsheet document that is invalid. Care must be taken with this attribute to ensure that the span does not include another row index that is specified.
Unlike columns, rows with the Span attribute must be empty. A row that contains a Span attribute and one or more Cell elements is considered invalid. The Span attribute for rows is a short-hand method for setting formatting properties for multiple, empty rows.
Type:
Unsigned Long
Attribute:
ss:StyleID
Description:
Specifies a reference to a previously defined ID attribute in a Style tag. This reference indicates that this Style should be used to format this element. If this attribute is not present, the default Style should applied to this element.
Defines a single style in the current workbook. This element is optional, but is required to perform any custom formatting. A style can be either standalone or based on one other style (this is called the parent style), in which case, all base properties are first inherited from the parent, then the properties in the style are treated as overrides. Parent styles must be specified before they are first referenced. This means we will not allow:
To define the default style for this workbook, set the ss:ID attribute to "Default". If a Parent style is not specified, it is assumed that the style with ID="Default" is used as the parent.
Required Attributes
Attribute:
ss:ID
Description:
A unique name within this XML document that identifies this style. This string can be any valid identifier and there is no notion of order. The special value of "Default" indicates that this style represents the default formatting for this workbook.
Type:
Unique String ID
Optional Attributes
Attribute:
ss:Name
Description:
This property identifies this style as a named style that was created in Excel using the Style command (Format menu). Duplicate names are illegal.
Type:
String
Attribute:
ss:Parent
Description:
Presence of this element indicates that this style should first inherit it's default formatting settings from the specified parent style. Then, after the parent settings are inherited, we apply the settings in this style as overrides. This attribute refers to a predefined style ID.
Type:
ID Reference
<ss:Styles> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Workbook
Required elements:
(none)
Optional elements:
ss:Style
Required attributes:
(none)
Optional attributes:
(none)
Description
Contains the style definitions for the current worksheet. This element is optional, but is required to perform for any custom formatting.
Defines the cell table within the current worksheet. In this version of the schema, only one instance of a Table tag is valid for a single worksheet.
The optional TopCell, LeftCell, RowCount, and ColumnCount attributes specify the used range for this cell table, indicating the furthest filled extents. Cell formulas are specified relative to the TopCell and LeftCell indices, and should be adjusted when placed into a sheet (assuming that TopCell and LeftCell are not [1, 1]). When saving an entire worksheet or a collection of sheets in a workbook, TopCell and LeftCell will be saved as (1, 1). When saving a range as XML, the TopCell and LeftCell indices are used to specify the location of the range within the worksheet. This allows for future expansion where multiple, non-overlapping tables could be stored within a single worksheet.
Optional Attributes
Attribute:
ss:DefaultColumnWidth
Description:
Specifies the default width of columns in this table. This attribute is specified in points.
Type:
Double
Default:
48
Attribute:
ss:DefaultRowHeight
Description:
Specifies the default height of rows in this table. This attribute is specified in points.
Type:
Double
Default:
12.75
Attribute:
ss:ExpandedColumnCount
Description:
Similar to ExpandedColumnCount, this attribute specifies the total number of columns in this table. If specified, this attribute must be in sync with the table. Columns indices in the table should begin at 1 and go to ExpandedColumnCount. If this value is out-of-sync with the table, the specified XML Spreadsheet document is invalid.
Type:
Unsigned Long
Attribute:
ss:ExpandedRowCount
Description:
Specifies the total number of rows in this table without regard for sparseness. This attribute defines the overall size of the table, if the specified rows and columns were expanded to full size. If specified, this attribute must be in sync with the table. Row indices in the table should begin at 1 and go to ExpandedRowCount. If this value is out-of-sync with the table, the specified XML Spreadsheet document is invalid.
Type:
Unsigned Long
Attribute:
ss:LeftCell
Description:
Specifies the column index that this table should be placed at. This value must be greater than zero.
Type:
Unsigned Long
Default:
1
Attribute:
ss:StyleID
Description:
Specifies a reference to a previously defined ID attribute within a Style tag. This reference indicates that this Style should be used to format this element. If this attribute is not present, the default Style should be applied to this element. The default style, if specified, is the <Style> tag whose ss:ID="Default".
Type:
ID Reference
Attribute:
ss:TopCell
Description:
Specifies the row index that this table should be placed at. This value must be greater than zero.
Type:
Unsigned Long
Default:
1
Attribute:
x:FullColumns
Description:
WebCalc will set x:FullColumns to 1 when the data in the table represents full columns of data. Excel will save x:FullColumns to 1 if the <Table> extends the full height. This attribute is ignored on file load, but on XML Spreadsheet paste it is taken to indicate that the source clip has full columns.
Type:
Boolean
Attribute:
x:FullRows
Description:
WebCalc will set x:FullRows to 1 when the data in the table represents full rows of data. Excel will save x:FullRows to 1 if the <Table> extends the full width. This attribute is ignored on file load, but on XML Spreadsheet paste it is taken to indicate that the source clip has full rows.
Defines a workbook that will contain one or more Worksheet elements. This is the top-most element of an XML Spreadsheet document and is required. This element has a required order for child elements. The order is:
Defines a worksheet within the current workbook. At least one instance of this element is required within a valid XML Spreadsheet document. This element has a required order for child elements. The order is:
This tag specifies the name of this worksheet. This value must be unique within the list of sheet names in this workbook. Sheet names must conform to the legal names of Excel sheets and, thus, cannot contain /, \, ?, *, [, ].
Type:
String
Optional Attributes
Attribute:
ss:Protected
Description:
This attribute indicates whether or not the worksheet is protected. When the worksheet is not protected, cell-level protection has no effect.
Type:
Boolean
Default:
0 (False)
Attribute:
ss:RightToLeft
Description:
If this attribute is True (1), the window displays from right to left, but if this element is not specified (or zero), the window displays from left to right. The Spreadsheet component does not support this attribute.
Type:
Boolean
Default:
0 (False)
<stN:SmartTag> Tag
Used by:
Excel only
Parent element:
o:SmartTags
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
(none)
Description
A collection of SmartTag tags, each of which denote single instances of a smart tag on a cell. stN (for example, st1, st2) refers to the individual name space for this smart tag type as defined in the smart tag type definition. The name for this tag is not SmartTag, either, but actually the tag name as defined in the SmartTagType tag.
To add smart tags to your workbook, go to the Smart Tags tab (AutoCorrect dialog box, Tools menu) and check all of the boxes. Smart tags are not available in the Spreadsheet component.
stN:SmartTag tags can also contain an arbitrarily defined list of attributes with the tag. This is up to the smart tag owner to define in the namespace. Programmatically, a developer can add new attributes to their smart tags either via Range("A1").SmartTags(1).Properties.Add "star", "bar" (which adds an attribute called Star with a value bar), or doing recognition or action time by manipulating the passed-in ISmartTagProperties object.
<Sub> Tag
Used by:
Excel only
Parent element:
ss:Data
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
(none)
Description
Specifies a change to subscript within an Excel rich-text data stream.
<Sup> Tag
Used by:
Excel only
Parent element:
ss:Data
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
(none)
Description
Specifies a change to superscript within an Excel rich-text data stream.
<U> Tag
Used by:
Excel only
Parent element:
ss:Data
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
x:Style
Description
Specifies a change to underline within an Excel rich-text data stream.
Optional Attributes
Attribute:
x:Style
Description:
Specifies the underline style to use.
Type:
Enumeration—text-underline:single, text-underline:double, text-underline:single-accounting, and text-underline:double-accounting
Default:
text-underline:single
<x:AutoFilter> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Worksheet
Required elements:
(none)
Optional elements:
x:AutoFilterColumn
Required attributes:
x:Range
Optional attributes:
(none)
Description
Defines an AutoFilter range on the current worksheet. This element can contain one or more x:AutoFilterColumn elements (up to one per column) with the appropriate filter settings. If no x:AutoFilterColumn elements exist, each column in the range is assumed to be set to Type="all" (see x:AutoFilterColumn for more details).
Required Attributes
Attribute:
x:Range
Description:
This tag specifies the AutoFilter range in R1C1 notation and is required. It is assumed that the topmost row specifies the headers for the AutoFilter. There is no way to create an AutoFilter without a header row. This attribute is required to be an absolute reference.
Type:
String
<x:AutoFilterAnd> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
x:AutoFilterColumn
Required elements:
x:AutoFilterCondition
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
(none)
Description
Defines an AND condition in a custom AutoFilter function. Currently, Excel allows a custom AutoFilter function to contain at most one AND or one OR condition. If this tag exists, it must contain at least one <x:AutoFilterCondition> tag to define the test condition(s).
Defines the filtering properties for a single column of the AutoFilter range. If one or more columns are omitted, we assume that no filtering should occur on those columns.
Optional Attributes
Attribute:
x:Hidden
Description:
True specifies that this AutoFilter column is hidden. False (or omitted) specifies that this AutoFilter column is shown.
Type:
Boolean
Default:
0 (False)
Attribute:
x:Index
Description:
Specifies the position of this column within the AutoFilter range.
If this tag is not specified, the first instance has an assumed Index="1". Each additional <x:AutoFilterColumn> element has an assumed Index that is one higher.
Indices must appear in strictly increasing order. Failure to do so will result in an XML Spreadsheet document that is invalid. Indices do not need to be sequential, however.
Indices must not overlap. If duplicates exist, the behavior is unspecified and the XML Spreadsheet document is considered invalid.
Type:
Unsigned Long
Attribute:
x:Type
Description:
Specifies the type of filtering to apply to this column. By default we assume "all", meaning that this column is not causing any items to be filtered. When multiple columns contain filtering, only rows meeting all the filter criterion are shown. A description of each of the filter types is given below, but in the context that only this column contains filtering. This provides simplicity, without loss of generality.
All—Display all of the rows in the AutoFilter range. Nothing is filtered.
Blanks—Only display rows in the AutoFilter range where cells in this column are empty.
NonBlanks—Only display rows in the AutoFilter range where cells in this column contain data.
Top—Only display rows in the AutoFilter range for the top n values. When this filter type is specified, the Value attribute is required and must contain the number (specifically a whole number greater than zero) of items to display.
TopPercent—Only display rows in the AutoFilter range where values in this column are in the top n%. When this filter type is specified, the Value attribute is required and must contain the percentage (specifically a decimal value between 0.0 and 100.0) of top items to display.
Bottom—Only display rows in the AutoFilter range for the bottom n values. When this filter type is specified, the Value attribute is required and must contain the number (specifically a whole number greater than zero) of items to display.
BottomPercent—Only display rows in the AutoFilter range where values in this column are in the bottom n%. When this filter type is specified, the Value attribute is required and must contain the percentage (specifically a decimal value between 0.0 and 100.0) of bottom items to display.
Custom—Only display rows in the AutoFilter range whose values meet the criteria specified inside this element. When Type="custom", this element must contain at least one <x:AutoFilterCondition> tag, but these conditions may also be nested inside of <x:AutoFilterAnd> or <x:AutoFilterOr> tags.
The Spreadsheet component supports All, Blanks, NonBlanks, and Custom.
Type:
Enumeration—All, Blanks, NonBlanks, Top, TopPercent, Bottom, BottomPercent, and Custom
Default:
All
Attribute:
x:Value
Description:
Specifies the number or percentage of items to display when the filter type is set to top, top-percent, bottom, or bottom-percent. This attribute may not appear unless the Type attribute is set to one of those four values. See the Type attribute for value restrictions to this attribute.
Defines a single condition in a custom AutoFilter function.
Required Attributes
Attribute:
x:Operator
Description:
Specifies the operator to use in this filter condition. Note that wildcard characters are permitted, so to store the equivalent of "BeginsWith a", we would save <x:AutoFilterCondition x:Operator="Equals" x:Value="a*">.
Type:
Enumeration—Equals, DoesNotEqual, GreaterThan, GreaterThanOrEqual, LessThan, and LessThanOrEqual
Attribute:
x:Value
Description:
Specifies the value to use with the associated Operator attribute.
Type:
String
<x:AutoFilterOr> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
x:AutoFilterColumn
Required elements:
x:AutoFilterCondition
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
(none)
Description
Defines an OR condition in a custom AutoFilter function. Currently, Excel allows a custom AutoFilter function to contain at most one AND or one OR condition. If this tag exists, it must contain two <x:AutoFilterCondition> tags, defining the test conditions.
<x:Footer> Tag
Used by:
Excel only
Parent element:
x:PageSetup
Required elements:
(none)
Optional elements:
(none)
Required attributes:
x:Margin
Optional attributes:
x:Data
Description
Specifies the footer for each printed page.
Required Attributes
Attribute:
x:Margin
Description:
Specifies the margin for the footer.
Type:
Double
Default:
0.5
Optional Attributes
Attribute:
x:Data
Description:
Specifies the data for the footer. This is a string in the same format as the Cascading Style Sheet (CSS) for Excel 2000.
Type:
String
<x:Header> Tag
Used by:
Excel only
Parent element:
x:PageSetup
Required elements:
(none)
Optional elements:
(none)
Required attributes:
x:Margin
Optional attributes:
x:Data
Description
Specifies the header for each printed page.
Required Attributes
Attribute:
x:Margin
Description:
Specifies the margin for the header.
Type:
Double
Default:
0.5
Optional Attributes
Attribute:
x:Data
Description:
Specifies the data for the header. This is a string in the same format as the Cascading Style Sheet (CSS) for Excel 2000.
Determines the layout for the page setup. This includes page orientation, centering, and page numbers.
Optional Attributes
Attribute:
x:CenterHorizontal
Description:
If True, the document should be centered on the page.
Type:
Boolean
Default:
0 (False)
Attribute:
x:CenterVertical
Description:
If True, the document should be centered on the page.
Type:
Boolean
Default:
0 (False)
Attribute:
x:Orientation
Description:
Specifies the orientation of the page.
Type:
Enumeration—Portrait and Landscape
Default:
Portrait
Attribute:
x:StartPageNumber
Description:
Specifies the starting page number for printouts.
Type:
Unsigned Long
<x:PageMargins> Tag
Used by:
Excel only
Parent element:
x:PageSetup
Required elements:
(none)
Optional elements:
(none)
Required attributes:
x:Bottom, x:Left, x:Right, x:Top
Optional attributes:
(none)
Description
Specifies the margins for printed pages.
Required Attributes
Attribute:
x:Bottom
Description:
Specifies the bottom margin on the page in inches.
Type:
Double
Default:
1
Attribute:
x:Left
Description:
Specifies the left margin on the page in inches.
Type:
Double
Default:
0.75
Attribute:
x:Right
Description:
Specifies the right margin on the page in inches.
Type:
Double
Default:
0.75
Attribute:
x:Top
Description:
Specifies the top margin on the page in inches.
Type:
Double
Default:
1
<x:PageSetup> Tag
Used by:
Excel only
Parent element:
x:WorksheetOptions
Required elements:
(none)
Optional elements:
x:Footer, x:Header, x:Layout, x:PageMargins
Required attributes:
(none)
Optional attributes:
(none)
Description
Contains the print options for this workbook.
<x:PhoneticText> Tag
Used by:
Excel only
Parent element:
ss:Cell
Required elements:
(none)
Optional elements:
(none)
Required attributes:
(none)
Optional attributes:
x:Visible
Description
Specifies the additional phonetic "hint" text that should be associated with this cell's data. This information is extremely important for East Asia, especially for sorting data.
Optional Attributes
Attribute:
x:Visible
Description:
Specifies whether phonetic text is displayed. This option is only available on East Asian versions of Excel. When x:Visible is on, phonetic text will be displayed above the regular cell text. Current implementation limitations: this tag won't roundtrip in non-East Asian versions of Excel; phonetic text can be associated with groups of characters (like Rich Text) in Excel, but when it is saved, it loses the character association and the text becomes lumped together.
Type:
Boolean
Default:
0 (False)
<x:WorksheetOptions> Tag
Used by:
Both Excel and the Spreadsheet component
Parent element:
ss:Worksheet
Required elements:
(none)
Optional elements:
x:PageSetup
Required attributes:
(none)
Optional attributes:
(none)
Description
This is an Excel defined element that contains a number of specific Excel features.