Class Spreadsheet_Excel_Writer_BIFFwriter

Description

Class for writing Excel BIFF records.

From "MICROSOFT EXCEL BINARY FILE FORMAT" by Mark O'Brien (Microsoft Corporation):

BIFF (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. BIFF files consist of sequences of variable-length records. There are many different types of BIFF records. For example, one record type describes a formula entered into a cell; one describes the size and location of a window into a document; another describes a picture format.

Located in /libraries/pear/Spreadsheet/Excel/Writer/BIFFwriter.php (line 54)

PEAR
   |
   --Spreadsheet_Excel_Writer_BIFFwriter
Direct descendents
Class Description
 class Spreadsheet_Excel_Writer_Worksheet Class for generating Excel Spreadsheets
 class Spreadsheet_Excel_Writer_Workbook Class for generating Excel Spreadsheets
Variable Summary
 integer $_BIFF_version
 integer $_byte_order
 string $_data
 integer $_datasize
 integer $_limit
Method Summary
 Spreadsheet_Excel_Writer_BIFFwriter Spreadsheet_Excel_Writer_BIFFwriter ()
 string _addContinue (string $data)
 void _append (string $data)
 void _prepend (string $data)
 void _setByteOrder ()
 void _storeBof (integer $type)
 void _storeEof ()
Variables
integer $_BIFF_version = 0x0500 (line 60)

The BIFF/Excel version (5).

integer $_byte_order (line 66)

The byte order of this architecture. 0 => little endian, 1 => big endian

string $_data (line 72)

The string containing the data of the BIFF stream

integer $_datasize (line 78)

The size of the data in bytes. Should be the same as strlen($this->_data)

integer $_limit (line 85)

The maximun length for a BIFF record. See _addContinue()

Methods
Constructor Spreadsheet_Excel_Writer_BIFFwriter (line 92)

Constructor

  • access: public
Spreadsheet_Excel_Writer_BIFFwriter Spreadsheet_Excel_Writer_BIFFwriter ()
_addContinue (line 215)

Excel limits the size of BIFF records. In Excel 5 the limit is 2084 bytes. In Excel 97 the limit is 8228 bytes. Records that are longer than these limits must be split up into CONTINUE blocks.

This function takes a long BIFF record and inserts CONTINUE records as necessary.

  • return: A very convenient string of continue blocks
  • access: private
string _addContinue (string $data)
  • string $data: The original binary data to be written
_append (line 148)

General storage function

  • access: private
void _append (string $data)
  • string $data: binary data to append

Redefined in descendants as:
_prepend (line 133)

General storage function

  • access: private
void _prepend (string $data)
  • string $data: binary data to prepend
_setByteOrder (line 108)

Determine the byte order and store it as class data to avoid recalculating it for each call to new().

  • access: private
void _setByteOrder ()
_storeBof (line 165)

Writes Excel BOF record to indicate the beginning of a stream or sub-stream in the BIFF file.

  • access: private
void _storeBof (integer $type)
  • integer $type: Type of BIFF file to write: 0x0005 Workbook, 0x0010 Worksheet.
_storeEof (line 195)

Writes Excel EOF record to indicate the end of a BIFF stream.

  • access: private
void _storeEof ()

Documentation generated on Fri, 11 Feb 2005 18:12:46 +0000 by phpDocumentor 1.3.0RC3