Excel File Format Documentation



        Hello Everyone.

                My name is Charles Wyble, and I have taken it upon
myself, to completly document the Excel file format.
        Here are some nuggets I have learned from various
sources. In paticular 0x105c is documented.



The minimum records for a BIFF 8 file is not absolute,
because 
*it depends.* If you use Excel to create an empty
workbook, 
using Excel 2002 on Windows 2000 you'll get 146
records in the BIFF8.

The Global section is layed out as follows:

BOF
INTERFACEHDR
MMS
INTERFACEEND
WRITEACCESS
CODEPAGE
DSF
XL9FILE
TABID
FNGROUPCOUNT 
WINDOWPROTECT
PROTECT
PASSWORD
PROT4REV
PROT4REVPASS
WINDOW1 
BACKUP
HIDEOBJ
1904
PRECISION
REFRESHALL 
BOOKBOOL
FONT
FONT
FONT
FONT
FORMAT
FORMAT
FORMAT
FORMAT
FORMAT
FORMAT
FORMAT
FORMAT
20 XF records
6 STYLE records
USESELFS
BOUNDSHEET 
BOUNDSHEET 
BOUNDSHEET 
COUNTRY
RECALCID
SST
EXTSST
EOF 

Then, there are three sets of the following (one for
each worksheet) 
BOF
INDEX
CALCMODE
CALCCOUNT
REFMODE
ITERATION
DELTA
SAVERECALC
PRINTHEADERS
PRINTGRIDLINES
GRIDSET
GUTS
DEFAULTROWHEIGHT
WSBOOL 
HEADER
FOOTER
HCENTER 
VCENTER
SETUP
DEFCOLWIDTH
DIMENSIONS
WINDOW2
SELECTION
PHONETIC 
EOF

The PHONETIC (00 EFh) record can be ignored, probably
omitted, 
and Excel will continue to consider the BIFF8 record
to be 
valid.  
Excel writes the PHONETIC record ID, the record-length
count, and the 
following 6 bytes 00 00 37 00 00 00 for each of the 3
worksheets. 


0x1c0  XL9FILE 
This record identifies a file as having been written
by Excel2000.
It's a zero byte record. You shouldn't need to write
this record.

0x1c1  RECALCID 
This record contains an ID that marks when a worksheet
was last recalculated. It's an optimization Excel uses
to determine if 
it needs to recalculate the spreadsheet when it's
opened. Since Excel 
hasn't ever touched the file you're creating, you
shouldn't write this record.


0x105c  ClrtClient 
This record contains RGB quads for the foreground, 
background, and possibly the neutral colors in use 
when the workbook was saved. You shouldn't need to 
write this record.

0xef  PhoneticInfo 
This record is for internal use only, and shouldn't 
be written.

The EXTERNCOUNT record was used in BIFF7 and earlier,
but isn't used in 
BIFF8.  In BIFF7 and previous, EXTERNSHEET records
form a table of 
external references.  The EXTERNCOUNT record provided
a count of those 
records. In BIFF8, the path and file name have been
moved to the SUPBOOK 
record, and the EXTERNCOUNT record is no longer
needed.


0xe5h rtMergeCells


Another good source of documentation is
sc.openoffice.org/excelfileformat.pdf<.

Also if you do a search on msdn.microsoft.com/library,
for "BIFF" and "Chart BIFF" you will 
find alot of info on the file format.

-Charles
God Bless
jackshck yahoo com



__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]