SELECTION: Current Selection (1Dh)

The SELECTION record stores the selection.

Record Data

Offset

Name

Size

Contents

4

pnn

1

Number of the pane described

5

rwAct

2

Row number of the active cell

7

colAct

2

Column number of the active cell

9

irefAct

2

Ref number of the active cell

11

cref

2

Number of refs in the selection

13

rgref

var

Array of refs


The pnn field indicates which pane is described. It contains one of the following values:

0 = lower right
1 = upper right
2 = lower left
3 = upper left

For a window that has no splits, the pnn field = 3.

The rwAct and colAct fields specify the active cell.

The irefAct field is a 0-based index into the array of ref structures (refs), specifying which ref contains the active cell. The rgref is an array because it is possible to create a multiple selection. In the case of a multiple selection, each selection is described by a ref, including the active cell (even if it is included in one of the other selections).

The selection (of cells) is described by the rgref array. The number of refs in the rgref field is equal to cref. Each ref in the array is 6 bytes long and contains the fields listed in the following table.

Offset

Name

Size

Contents

0

rwFirst

2

First row in the reference

2

rwLast

2

Last row in the reference

4

colFirst

1

First column in the reference

5

colLast

1

Last column in the reference


If a selection is so large that it exceeds the maximum BIFF record size, it is broken down into multiple consecutive SELECTION records. Each record contains a portion of the larger selection. Only the cref and rgref fields vary in the multiple records; the pnn, rwAct, colAct, and irefAct fields are the same across all records in the group.