07.05.2014 Views

The Microsoft Excel File Format - OpenOffice.org

The Microsoft Excel File Format - OpenOffice.org

The Microsoft Excel File Format - OpenOffice.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4 Worksheet/Workbook Stream<br />

4.7.5 Finding Row Blocks in a Worksheet<br />

Sometimes it may be useful to jump directly to a specific cell in the Worksheet Stream or Sheet Substream. <strong>The</strong> first step<br />

is to find the Row Block which contains the cell. How to find a cell inside the Row Block is described in ➜4.7.4.<br />

<strong>The</strong> INDEX record (➜5.59) stores the index to the first used row and stream offsets for each Row Block in the sheet.<br />

• Finding Row Blocks in BIFF2-BIFF4<br />

In BIFF2-BIFF4 the INDEX record contains an array with the stream positions of the first ROW record of each Row<br />

Block. This array contains also positions for empty Row Blocks. In this case the position of the next extant Row Block is<br />

used.<br />

Example: A worksheet contains data in the rows 2, 4, 65, and 100. <strong>The</strong> range of used rows in the INDEX record<br />

is 2…101 (last used row + 1). <strong>The</strong>re are 4 Row Blocks in the sheet: 2…33, 34…65, 66…97, and 98…130. <strong>The</strong><br />

third Row Block is empty.<br />

0000 H BOF Type = worksheet<br />

Sheet records<br />

002E H INDEX Row range = 2…101<br />

Offsets = 049A H , 04DE H , 0500 H , 0500 H<br />

Sheet records<br />

049A H ROW Row = 2<br />

04AE H ROW Row = 4<br />

04DE H ROW Row = 65<br />

0500 H ROW Row = 100<br />

EOF<br />

Cell records for this Row Block<br />

Cell records for this Row Block<br />

Cell records for this Row Block<br />

Sheet records<br />

Because the third Row Block is empty, the third offset in the INDEX record array points to the fourth Row Block.<br />

94

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!