[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

scenarios (Scenarios)

A collection of Scenarios. A scenario is a named what-if model that includes variable cells linked together by one or more formulas. For example, you might want to compare best-case and worst-case scenarios for sales in a coffee shop, based on the number of cups of coffee sold in a week.

[Example:

<scenarios current="1" show="0" sqref="G4 G6 G7 G8">
<scenario name="Best Case" locked="1" count="3" user="anonymous"
comment="Created on 6/9/2006_x000a_Modified on 6/9/2006">
<inputCells r="D5" val="151" numFmtId="37"/>
<inputCells r="D9" val="226"/>
<inputCells r="D13" val="126"/>
</scenario>

<scenario name="Worst Case" locked="1" count="3" user="anonymous"
comment="Created on 6/9/2006">
<inputCells r="D5" val="50" numFmtId="37"/>
<inputCells r="D9" val="40"/>
<inputCells r="D13" val="30"/>
</scenario>
</scenarios>

end example]

Parent Elements

worksheet3.3.1.96)

 

Child Elements

Subclause

scenario (Scenario)

§3.3.1.73

 

Attributes

Description

current (Current Scenario)

Zero-based index to current scenario selected. Can correspond to selection UI.

 

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

show (Last Shown Scenario)

Zero-based index to last shown scenario. Indicates which scenario was last selected by the user to be run/shown.

 

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

sqref (Sequence of References)

Range or sequence of cells used for scenario results summary.

 

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

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Scenarios">

   <sequence>

   <element name="scenario" type="CT_Scenario" minOccurs="1" maxOccurs="unbounded"/>

   </sequence>

   <attribute name="current" type="xsd:unsignedInt" use="optional"/>

   <attribute name="show" type="xsd:unsignedInt" use="optional"/>

   <attribute name="sqref" type="ST_Sqref" use="optional"/>

</complexType>