The Microsoft Excel File Format - OpenOffice.org
The Microsoft Excel File Format - OpenOffice.org
The Microsoft Excel File Format - OpenOffice.org
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.4 Finding Cells in a Row Block<br />
• Finding Cells in a Row Block (BIFF2-BIFF4)<br />
In BIFF2-BIFF4, the ROW record contains a stream offset, pointing to the cell records of the respective row. <strong>The</strong> offset<br />
value of the first ROW record in a Row Block represents the difference between the start of the second ROW record and<br />
the first cell record. <strong>The</strong> offset of the second ROW record contains the size of all cell records of the first row, and so on.<br />
If a row does not contain any cells, the offset to the cells in the next filled row is stored.<br />
Example: A Row Block contains one cell per row in the rows 10, 11, and 12. Row 13 is not used, the height of<br />
row 14 is changed (but it does not contain a cell). Row 15 contains a cell again. In this example, the first column<br />
shows the absolute stream position of each record.<br />
048E H ROW Row = 10, offset = 0050 H<br />
04A2 H ROW Row = 11, offset = 000E H<br />
04B6 H ROW Row = 12, offset = 0012 H<br />
04CA H ROW Row = 14, offset = 000E H (no record for row 13)<br />
04DE H ROW Row = 15, offset = 0000 H<br />
04F2 H RK Address = A10<br />
0500 H NUMBER Address = A11<br />
0512 H RK Address = A12<br />
0520 H NUMBER Address = A15<br />
<strong>The</strong> base position for the calculation of all cell record positions is the start of the second ROW record, 04A2 H .<br />
This is for convenience: After reading the first ROW record it is possible to calculate the position of the first cell<br />
record, using the current stream position and the offset contained in the ROW record.<br />
• <strong>The</strong> first ROW record describes row 10. <strong>The</strong> cell records of this row start in 04A2 H + 0050 H = 04F2 H .<br />
• <strong>The</strong> second ROW record describes row 11. <strong>The</strong> cell records start in 04A2 H + 0050 H + 000E H = 0500 H .<br />
• <strong>The</strong> third ROW record describes row 12. <strong>The</strong> cell records of row 12 start in<br />
04A2 H + 0050 H + 000E H + 0012 H = 0512 H .<br />
• <strong>The</strong> fourth ROW record describes row 14. It does not contain cell records. So the offset points to the cells of<br />
the next used row (row 15).<br />
<strong>The</strong> stream position is 04A2 H + 0050 H + 000E H + 0012 H + 000E H = 0520 H .<br />
• <strong>The</strong> last ROW record record describes row 15. Because for row 14 the stream position for row 15 is calculated<br />
already, this ROW record contains the offset 0000 H . <strong>The</strong> stream position evaluates to the correct value<br />
04A2 H + 0050 H + 000E H + 0012 H + 000E H + 0000 H = 0520 H .<br />
If the size of all cell records of a row exceeds FFFF H , the respective ROW record will contain the offset 0000 H . From<br />
this row on, the offsets cannot be used anymore to calculate stream positions.<br />
92