create my own excel file


Posted by Het Orakel on February 15, 2002 5:18 AM

When I and my proggy want to create an excel file (version not important), how should i start with it?

i.e. I want to write the binary format including some simple layout, like cell-background colors, cell-width, bold-typeface etc. The idea is to export my data in a way that will be readble for the MS-X prog.

Posted by Ivan F Moala on February 15, 2002 12:29 PM


Do you really want to get into doing this ?!
In order to do this you must understand the
BIIF (BInary File Format) is the file format in
which Excel documents are saved on disk. A BIFF
file is a complete description of an Excel document.
You will need to know the basic structure that
the BIFF follows; = Record type, record length,
record data.
These are some of the details you will need to
know;
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

Rather then learn all this you are better off looking
@ the MSOWC.DLL = Spreadsheet control MSOWS.DLL Microsoft Office spreadsheet 9

Not sure if this is avail separately as it comes
std on office2K onwards.


Ivan



Posted by Jack in the UK on February 15, 2002 2:14 PM

Ivan --- wow im off for a beer that blow my mind, dar not going there! Tip o the hat my man!!!! [NT]

PASS