From sujin@worldnet.att.net Mon Aug  4 11:59:32 1997
Path: newsfeed.cv.nrao.edu!newsgate.duke.edu!nntprelay.mathworks.com!europa.clark.net!4.1.16.34!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!worldnet.att.net!newsadm
From: Sujin Han <sujin@worldnet.att.net>
Newsgroups: sci.data.formats
Subject: Re: BMP Data Format
Date: Sat, 02 Aug 1997 00:05:53 -0700
Organization: AT&T WorldNet Services
Lines: 73
Message-ID: <33E2DC51.4CE@worldnet.att.net>
References: <01bc9e5f$92a686c0$131364c3@MR_BIG.HISINGEN>
NNTP-Posting-Host: 207.147.132.245
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.02E (Win95; U)
Xref: newsfeed.cv.nrao.edu sci.data.formats:50

Max Kielland wrote:
> 
> Hi
> 
> I have the format description for the BMP format, but the documentation is
> very poor on the Black/White description.When i save my pictures and then
> reads them again, i sometimes get an GDI Error...
> 
> The documentation is very poor in this case, specialy on the description
> for the picture width. I have been experimenting with some padding to even
> multipples of 2 and 4, but i still got the GDI error on some pictures.
> 
> Max
> max.k@swecoin.se

Here is the part of c source code that i wrote some months ago when doing experiments on 
bmp formats. might not be the best way, but could help you start on right track.
BmInfoHeader.biWidth is the width of bitmap in PIXELS. For a black'n White picture, one 
pixel represents eight black or white dots in the picture. Be sure to have multiple of 
16bits per scan line(or multiple of 4bytes/scan line).

/********************************************************************************
/ write .bmp 
/ prep three Headers for .bmp 
/ determine total size of file; assume black'n White picture
*********************************************************************************/	
			
	totalDataSize = (DWORD)(loutbufSize);
	offsetToData = sizeof(BmFileHeader) + sizeof(BmInfoHeader) + 2*sizeof(RGBQUAD);
	totalFileSize = totalDataSize + offsetToData;
	

/* set parameters of BITMAPFILEHEADER */

	BmFileHeader.bfType = 0x4d42;
	BmFileHeader.bfSize = totalFileSize;
	BmFileHeader.bfReserved1 = 0;
	BmFileHeader.bfReserved2 = 0;
	BmFileHeader.bfOffBits = offsetToData;
	
	
/* set parameters of BITMAPINFOHEADER */
	
	BmInfoHeader.biSize = sizeof(BmInfoHeader);
	BmInfoHeader.biWidth = xSize;
	BmInfoHeader.biHeight = ySize;
	BmInfoHeader.biPlanes = 1;
	BmInfoHeader.biBitCount = 1;    /* color bits per pixel(1,4,8 or 24) */ 
	BmInfoHeader.biCompression = 0;	/* no compression */
	BmInfoHeader.biSizeImage = 0;	/* only requiered if compression is used */
	BmInfoHeader.biXPelsPerMeter = 0;
	BmInfoHeader.biYPelsPerMeter = 0;
	BmInfoHeader.biClrUsed = 2;
	BmInfoHeader.biClrImportant = 0;
											 
  	
/* open output file */
	if( (ofp = fopen( outFile, "wb")) == NULL )
		return	17; /* Error open output file   */

/* output Headers and Data to file */
	fwrite(&BmFileHeader, sizeof(BmFileHeader), 1, ofp);
	fwrite(&BmInfoHeader, sizeof(BmInfoHeader), 1, ofp);
	fwrite(&bmiColors, sizeof(RGBQUAD), 2, ofp);	
	fwrite(inbuf, sizeof(BYTE), (size_t)loutbufSize,ofp);

	fclose(ofp);

	_ffree(inbuf);
	_ffree(outbuf);

	return 1;
}

From r.bauer@fz-juelich.de Wed Aug  6 09:15:13 1997
Path: newsfeed.cv.nrao.edu!newsgate.duke.edu!nntprelay.mathworks.com!news.maxwell.syr.edu!demos!Gamma.RU!srcc!Radio-MSU.net!news-ham1.dfn.de!news-han1.dfn.de!news-koe1.dfn.de!news.kfa-juelich.de!news
From: "R. Bauer" <r.bauer@fz-juelich.de>
Newsgroups: sci.data.formats
Subject: hdf Fileformats
Date: Tue, 05 Aug 1997 09:16:24 +0200
Organization: Forschungszentrum Juelich Gmbh (KFA)
Lines: 18
Message-ID: <33E6D348.41C6@fz-juelich.de>
NNTP-Posting-Host: ich230.zam.kfa-juelich.de
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0 (X11; I; AIX 1)
Xref: newsfeed.cv.nrao.edu sci.data.formats:51

Hi,

I have a hdf File Version 3.3 from 1994.
I suspect that's there are differences to Version 4 whith
incompatibilities.

At the moment I'am able to read data whith Version 4 from the file but
no attributes.
Is it true that's attributes stored in Version 3.3 different?



-- 
R.Bauer 

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de

From ibmstuff@oknet.com Thu Aug  7 20:46:03 1997
Path: newsfeed.cv.nrao.edu!newsgate.duke.edu!nntprelay.mathworks.com!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!su-news-hub1.bbnplanet.com!news.bbnplanet.com!zdc!super.zippo.com!lotsanews.com!news1.rcsntx.swbell.net!usenet
From: ibmstuff@oknet.com (David P.C. Wollmann)
Newsgroups: sci.data.formats
Subject: Re: MS Excel file format
Date: Thu, 07 Aug 1997 21:16:39 GMT
Organization: Southwestern Bell Internet Services
Lines: 26
Message-ID: <33ea39f1.18302237@news.swbell.net>
References: <Pine.SOL.3.91.970807160605.23152A-100000-100000-100000@sun5>
NNTP-Posting-Host: ppp-208-15-144-63.tulsok.swbell.net
X-Newsreader: Forte Free Agent 1.1/32.230
Xref: newsfeed.cv.nrao.edu sci.data.formats:57

Andreas,

Microsoft typically do not reveal their file formats, and have even forced
the removal of file format information from some online sites. Have you
considered using ODBC from a VB or C++ program to connect to Excel files?

David Wollmann
DST Data Conversion


On Thu, 7 Aug 1997 16:09:28 +0200, tbb03ar@sunmail.lrz-muenchen.de wrote:

>Hi,
>
>Where can I fond Information concerning the file format used by MS Excel?
>How do they store Integers, floats etc.?
>
>I searched at http://www.microsoft.com, but I couldn't find useful 
>Information.
>
>Thanks a lot.
>
>Andreas
>tbb03ar@sunmail.lrz-muenchen.de
>


From ibmstuff@oknet.com Sun Aug 10 21:10:56 1997
Path: newsfeed.cv.nrao.edu!newsgate.duke.edu!nntprelay.mathworks.com!europa.clark.net!128.223.220.30!logbridge.uoregon.edu!zdc!super.zippo.com!lotsanews.com!news1.rcsntx.swbell.net!usenet
From: ibmstuff@oknet.com (David P.C. Wollmann)
Newsgroups: sci.data.formats
Subject: Re: MS Excel file format
Date: Fri, 08 Aug 1997 16:32:45 GMT
Organization: Southwestern Bell Internet Services
Lines: 26
Message-ID: <33eb4598.10825274@news.swbell.net>
References: <Pine.SOL.3.91.970807160605.23152A-100000-100000-100000@sun5> <33ea39f1.18302237@news.swbell.net> <Pine.SOL.3.91.970808133213.15856A-100000@sun5>
NNTP-Posting-Host: ppp-208-15-144-81.tulsok.swbell.net
X-Newsreader: Forte Free Agent 1.1/32.230
Xref: newsfeed.cv.nrao.edu sci.data.formats:68

Anreas,

Take a look at: http://www.openlink.co.uk/

I'm not sure if they offer an Excel driver or not, but it's worth a look.

You might check to see if Microsoft FoxPro UNIX 2.6 includes a UNIX ODBC
driver for Excel.

David

On Fri, 8 Aug 1997 13:35:42 +0200, tbb03ar@sunmail.lrz-muenchen.de wrote:

>David,
>
>We're using UNIX and have to read Excel files.
>VB and VC won't work on our machines.
>
>On Thu, 7 Aug 1997, David P.C. Wollmann wrote:
>
>> Andreas,
>> 
>> Microsoft typically do not reveal their file formats, and have even forced
>> the removal of file format information from some online sites. Have you
>> considered using ODBC from a VB or C++ program to connect to Excel files?


From dwells@nrao.edu Mon Aug 11 10:56:52 1997
Path: newsfeed.cv.nrao.edu!newsfeed.cv.nrao.edu!dwells
From: dwells@nrao.edu (Don Wells)
Newsgroups: sci.data.formats
Subject: Re: MS Excel file format
Date: 11 Aug 1997 01:36:09 GMT
Organization: nrao
Lines: 25
Distribution: world
Message-ID: <DWELLS.97Aug10213609@fits.cv.nrao.edu>
References: <Pine.SOL.3.91.970807160605.23152A-100000-100000-100000@sun5>
	<33ea39f1.18302237@news.swbell.net>
	<Pine.SOL.3.91.970808133213.15856A-100000@sun5>
NNTP-Posting-Host: fits.cv.nrao.edu
In-reply-to: tbb03ar@sunmail.lrz-muenchen.de's message of Fri, 8 Aug 1997 13:35:42 +0200
Xref: newsfeed.cv.nrao.edu sci.data.formats:69

The Excel format is described in "Essential Books on File Formats", a
CD-ROM distributed by Dr.Dobb's which contains the text of six books.
The text of one of these books, "File Formats" by Allen G. Taylor,
contains this chapter: "CHAPTER 2: MICROSOFT EXCEL FILE FORMAT
Microsoft Excel is a popular spreadsheet.  It uses a file format
called BIFF (Binary File Format).  There are many types of BIFF
records.  Each has a 4 byte header.  The first two bytes are an opcode
that specifies the record type.  The second two bytes specify record
length.  Header values are stored in byte-reversed form (less
significant byte first).  The rest of the record is the data itself
(Figure 2-1).."

However, BIFF is not your only option! When you are in Excel you can
use the "SaveAs" command in the "File" menus of commands to write your
spreadsheet in a variety of different formats. For example, you can
write your data as a "WK1" file, the ancient Lotus 1-2-3 format which
is well documented in various places. Alternatively, write a "DIF"
file, which is plain ASCII, is also well documented and is easy to
read and write with simple programs. 

--
  Donald C. Wells         Associate Scientist         dwells@nrao.edu
                    http://fits.cv.nrao.edu/~dwells
  National Radio Astronomy Observatory                +1-804-296-0277
  520 Edgemont Road,   Charlottesville, Virginia       22903-2475 USA

From hmv@mail.telepac.pt Tue Aug 12 11:42:37 1997
Path: newsfeed.cv.nrao.edu!newsgate.duke.edu!nntprelay.mathworks.com!howland.erols.net!rill.news.pipex.net!pipex!tank.news.pipex.net!pipex!duke.telepac.pt!news.telepac.pt!usenet
From: "Helder M. Vieira" <hmv@mail.telepac.pt>
Newsgroups: sci.data.formats
Subject: Re: MS Excel file format
Date: 12 Aug 1997 15:47:09 GMT
Organization: hmv
Lines: 6
Message-ID: <01bca726$f8607c80$33ab41c2@hmv-oem-pentium>
References: <Pine.SOL.3.91.970807160605.23152A-100000-100000-100000@sun5>
NNTP-Posting-Host: 194.65.171.51
X-Newsreader: Microsoft Internet News 4.70.1162
Xref: newsfeed.cv.nrao.edu sci.data.formats:70


Microsoft published several books which included some file formats.
I once bought one of those books, named "Excel Software Development Kit"
(Microsoft Press,1993).
It described BIFF format as used by Excel 4, and included software disks.
I don't know if Microsoft has published data on later versions of Excel.

