\PhpOffice\PhpSpreadsheet\Writer\XlsBIFFwriter

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