BOF: Beginning of File (809h)

The BOF record marks the beginning of the Book stream in the BIFF file. It also marks the beginning of record groups (or "substreams" of the Book stream) for sheets in the workbook. For BIFF2 through BIFF4, you can determine the BIFF version from the high-order byte of the record number field, as shown in the following table. For BIFF5/BIFF7, and BIFF8 you must use the vers field at offset 4 to determine the BIFF version.

BOF Record Number Field

Offset

Name

Size

Contents

0

vers

1

version:
= 00 BIFF2
= 02 BIFF3
= 04 BIFF4
= 08 BIFF5/BIFF7/BIFF8

1

bof

1

09h


Record Data — BIFF8

Offset

Name

Size

Contents

4

vers

2

Version number:
= 0600 for BIFF8

6

dt

2

Substream type:
0005h = Workbook globals
0006h = Visual Basic module
0010h = Worksheet or dialog sheet
0020h = Chart
0040h = Microsoft Excel 4.0 macro sheet
0100h = Workspace file

8

rupBuild

2

Build identifier (=0DBBh for Microsoft Excel 97)

10

rupYear

2

Build year (=07CCh for Microsoft Excel 97)

12

bfh

4

File history flags

16

sfo

4

Lowest BIFF version (see text)


The rupBuild and rupYear fields contain numbers that identify the version (build) of Microsoft Excel that wrote the file. If you write a BIFF file, you can use the BiffView utility to determine the current values of these fields by examining a BOF record in a workbook file.

The sfo field contains the earliest version (vers field) of Microsoft Excel that can read all records in this file.

The bfh field contains the following flag bits:

Bits

Mask

Name

Contents

0

00000001h

fWin

= 1 if the file was last edited by Microsoft Excel for Windows

1

00000002h

fRisc

= 1 if the file was last edited by Microsoft Excel on a RISC platform


Bits

Mask

Name

Contents

2

00000004h

fBeta

= 1 if the file was last edited by a beta version of Microsoft Excel

3

00000008h

fWinAny

= 1 if the file has ever been edited by Microsoft Excel for Windows

4

00000010h

fMacAny

= 1 if the file has ever been edited by Microsoft Excel for the Macintosh

5

00000020h

fBetaAny

= 1 if the file has ever been edited by a beta version of Microsoft Excel

7 – 6

000000C0h

(Reserved)

Reserved; must be 0 (zero)

8

00000100h

fRiscAny

= 1 if the file has ever been edited by Microsoft Excel on a RISC platform

31 – 9

FFFFFE00

(Reserved)

Reserved; must be 0 (zero)


Record Data — BIFF5 and BIFF7

Offset

Name

Size

Contents

4

vers

2

Version number (0500 for BIFF5 and BIFF7)

6

dt

2

Substream type:
0005h = Workbook globals
0006h = Visual Basic module
0010h = Worksheet or dialog sheet
0020h = Chart
0040h = Microsoft Excel 4.0 macro sheet
0100h = Workspace file

8

rupBuild

2

Build identifier (internal use only)

10

rupYear

2

Build year (internal use only)