Compartir a través de


Sparkline Class

Defines the Sparkline Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is x14:sparkline.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Office2010.Excel.Sparkline

Namespace:  DocumentFormat.OpenXml.Office2010.Excel
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(Formula))> _
<ChildElementInfoAttribute(GetType(ReferenceSequence))> _
Public Class Sparkline _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As Sparkline
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(Formula))]
[ChildElementInfoAttribute(typeof(ReferenceSequence))]
public class Sparkline : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • DocumentFormat.OpenXml.Office.Excel.Formula <xne:f>

  • DocumentFormat.OpenXml.Office.Excel.ReferenceSequence <xne:sqref>

2.6.9 CT_Sparkline

Target namespace: https://schemas.microsoft.com/office/spreadsheetml/2010/main

Referenced by: CT_Sparklines

A complex type that specifies information for a single sparkline.

Child Elements:

xm:f : An f element that specifies the data range for this sparkline. The syntax, specified by Formulas, for this element is<17>:

sparkline-formula = single-sheet-area / [single-sheet-prefix / book-prefix] name

Additionally, if a single-sheet-area is specified, that single-sheet-area MUST contain cells from either a single row or a single column. If the single-sheet-area contains cells from a single row, then the rows of the single-sheet-area MUST either both be relative or both be absolute.<18> If the single-sheet-area contains cells from a single column and multiple rows, then the columns of the single-sheet-area MUST either both be relative or both be absolute.

xm:sqref : An sqref element that specifies the cell in which the sparkline is located. This sqref element MUST contain exactly one ref element which MUST specify exactly one cell.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_Sparkline">

<xsd:sequence>

<xsd:element ref="xm:f" minOccurs="1" maxOccurs="1"/>

<xsd:element ref="xm:sqref" minOccurs="1" maxOccurs="1"/>

</xsd:sequence>

</xsd:complexType>

See section 5.3 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Sparkline Members

DocumentFormat.OpenXml.Office2010.Excel Namespace