Spreadsheet_Excel_Writer
[ class tree: Spreadsheet_Excel_Writer ] [ index: Spreadsheet_Excel_Writer ] [ all elements ]

Class: Spreadsheet_Excel_Writer_BIFFwriter

Source Location: /main/inc/lib/pear/Spreadsheet_Excel_Writer/Writer/BIFFwriter.php

Class Overview

PEAR
   |
   --Spreadsheet_Excel_Writer_BIFFwriter

Class for writing Excel BIFF records.


Author(s):

Version:

  • Release: 1.4.11

Copyright:

  • 1997-2006 The PHP Group

Variables

Methods


Child classes:

Spreadsheet_Excel_Writer_Worksheet
Class for generating Excel Spreadsheets
Spreadsheet_Excel_Writer_Workbook
Class for generating Excel Spreadsheets

Inherited Variables

Inherited Methods

Class: PEAR

PEAR::PEAR()
Constructor. Registers this object in $_PEAR_destructor_object_list for destructor emulation if a destructor object exists.
PEAR::delExpect()
This method deletes all occurences of the specified element from the expected error codes stack.
PEAR::expectError()
This method is used to tell which errors you expect to get.
PEAR::getStaticProperty()
If you have a class that's mostly/entirely static, and you need static
PEAR::isError()
Tell whether a value is a PEAR error.
PEAR::loadExtension()
OS independant PHP extension load. Remember to take care on the correct extension name for case sensitive OSes.
PEAR::popErrorHandling()
Pop the last error handler used
PEAR::popExpect()
This method pops one element off the expected error codes stack.
PEAR::pushErrorHandling()
Push a new error handler on top of the error handler options stack. With this you can easily override the actual error handler for some code and restore it later with popErrorHandling.
PEAR::raiseError()
This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. If the $mode and $options parameters are not specified, the object's defaults are used.
PEAR::registerShutdownFunc()
Use this function to register a shutdown method for static classes.
PEAR::setErrorHandling()
Sets how errors generated by this object should be handled.
PEAR::staticPopErrorHandling()
PEAR::staticPushErrorHandling()
PEAR::throwError()
Simpler form of raiseError with fewer options. In most cases message, code and userinfo are enough.
PEAR::_checkDelExpect()
This method checks unsets an error code if available
PEAR::_PEAR()
Destructor (the emulated type of...). Does nothing right now, but is included for forward compatibility, so subclass destructors should always call it.

Class Details

[line 54]
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.




Tags:

author:  Xavier Noguer <xnoguer@php.net>
version:  Release: 1.4.11
copyright:  1997-2006 The PHP Group


[ Top ]


Class Variables

$_BIFF_version =  0x0500

[line 60]

The BIFF/Excel version (5).


Type:   integer


[ Top ]

$_byte_order =

[line 66]

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


Type:   integer


[ Top ]

$_data =

[line 72]

The string containing the data of the BIFF stream


Type:   string


[ Top ]

$_datasize =

[line 78]

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


Type:   integer


[ Top ]

$_limit =

[line 85]

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



Tags:


Type:   integer


[ Top ]



Class Methods


constructor Spreadsheet_Excel_Writer_BIFFwriter [line 92]

Spreadsheet_Excel_Writer_BIFFwriter Spreadsheet_Excel_Writer_BIFFwriter( )

Constructor



Tags:

access:  public


[ Top ]

method _addContinue [line 212]

string _addContinue( string $data)

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.




Tags:

return:  A very convenient string of continue blocks
access:  private


Parameters:

string   $data   The original binary data to be written

[ Top ]

method _append [line 146]

void _append( string $data)

General storage function



Tags:

access:  private


Overridden in child classes as:

Spreadsheet_Excel_Writer_Worksheet::_append()
Store Worksheet data in memory using the parent's class append() or to a temporary file, the default.

Parameters:

string   $data   binary data to append

[ Top ]

method _prepend [line 131]

void _prepend( string $data)

General storage function



Tags:

access:  private


Parameters:

string   $data   binary data to prepend

[ Top ]

method _setByteOrder [line 108]

void _setByteOrder( )

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



Tags:

access:  private


[ Top ]

method _storeBof [line 163]

void _storeBof( integer $type)

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



Tags:

access:  private


Parameters:

integer   $type   Type of BIFF file to write: 0x0005 Workbook, 0x0010 Worksheet.

[ Top ]

method _storeEof [line 192]

void _storeEof( )

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



Tags:

access:  private


[ Top ]


Documentation generated on Thu, 12 Jun 2008 13:00:14 -0500 by phpDocumentor 1.4.1