SCENARIO: Scenario Data (AFh)

This record stores information about an individual scenario.

Record Data

Offset

Name

Size

Contents

4

cref

2

Number of changing cells

6

fLocked

1

= 1 if the scenario is locked for changes

7

fHidden

1

= 1 if the scenario is hidden

8

cchName

1

Length of the name

9

cchComment

1

Length of the comment

10

cchNameUser

1

Length of the user name

11

rgch

var

Concatenation of the scenario name string, the user name string (preceded by a duplicate of cchNameUser), and the comment string (preceded by a duplicate of cchComment)

var

rgRef

var

Array of cell references that contains changing cells (see text)

var

rgst

var

Array of byte-counted strings that contains changing cell values (see text)

var

rgIfmt

var

Array of ifmt integers (see text)


The changing cells for the scenario are stored in the three arrays at the end of the record. The rgRef array contains the cell addresses, as shown in the following table.

Offset

Name

Size

Contents

0

rw

2

Row number (0-based)

2

col

2

Column number (0-based)


In BIFF8, the cell values are always stored as an array of unicode strings; for more information see "Unicode Strings in BIFF8" on page 264.

In BIFF7, the cell values are always stored as an array of byte-counted strings, as shown in the following table.

Offset

Name

Size

Contents

0

cch

1

Length of the string

1

rgch

var

String


Finally, the cell number format indexes (ifmt) are stored as an array of 2-byte integers, following the array of cell value strings. These are stored only when the scenario contains cells with date/time number formats. If the cells contain any other number format, the rgIfmt will contain 0's (zeros).