Knowledge Base

FILE: How to Create a BIFF5 File

Article ID: 150447

Article Last Modified on 8/18/2005


APPLIES TO


This article was previously published under Q150447

SUMMARY

BIFF is a file in the Microsoft Download Center that demonstrates how to create a file using the Microsoft Excel Binary Interchange File Format (BIFF) version 5.

MORE INFORMATION

The following file is available for download from the Microsoft Download Center:
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

The BIFF sample is a console application that prompts the user to input a path and file name. Once the user inputs this information, it writes a BIFF5 file to the name and location specified. The BIFF5 file that is created is simply an empty spreadsheet. It contains the minimum records necessary for this task.

NOTE: You must provide a unique name for the file. BIFF does not overwrite an existing file. Also, the directory location specified must exist in advance: BIFF will not create it.

BIFF5 files are Compound Files, which means that the OLE Structured Storage interfaces must be used to write the file. The necessary steps to do this are explicitly documented in the main() function comments in BIFF.CPP.

Additionally, because we are using OLE, the following issues exist: To construct the BIFF5 records themselves, I have implemented a set of functions that convert a string of hexadecimal characters to binary data. These functions can be found in hex2byte.cpp.

Files

BIFF.CPP / .H          Contains the console application entry point and
                       support functions, as well as the functions to
                       create the BIFF file.

HEX2BYTE.CPP / .H      Contains the functions to convert a hexadecimal
                       formatted string to binary data.

BIFF.MAK               Makefile for the project.
				

To Build

This project must be built as a 32-bit application. You can build for either Unicode or ANSI. You can use NMAKE with the attached makefile to build this project.

Additional query words: biff biff.zip

Keywords: kbhowto kbdownload kbnoupdate kbfile kbsample KB150447