\PHPExcel_Writer_Excel5_BIFFwriter

PHPExcel_Writer_Excel5_BIFFwriter

Copyright (c) 2006 - 2015 PHPExcel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Summary

Methods
Properties
Constants
__construct()
getByteOrder()
writeData()
writeEof()
$_data
$_datasize
No constants found
append()
storeBof()
storeEof()
No protected properties found
N/A
addContinue()
$byteOrder
$limit
N/A

Properties

$_data

$_data : string

The string containing the data of the BIFF stream

Type

string

$_datasize

$_datasize : integer

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

Type

integer

$byteOrder

$byteOrder : integer

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

Type

integer

$limit

$limit : integer

The maximum length for a BIFF record (excluding record header and length field). See addContinue()

Type

integer

Methods

__construct()

__construct() 

Constructor

getByteOrder()

getByteOrder() : integer

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

Returns

integer

writeData()

writeData(string  $data) : string

General storage function like append, but returns string instead of modifying $this->_data

Parameters

string $data

binary data to write

Returns

string

writeEof()

writeEof() 

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

append()

append(string  $data) 

General storage function

Parameters

string $data

binary data to append

storeBof()

storeBof(integer  $type) 

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

Parameters

integer $type

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

storeEof()

storeEof() 

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

addContinue()

addContinue(string  $data) : string

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.

Parameters

string $data

The original binary data to be written

Returns

string —

A very convenient string of continue blocks