35 require_once
'PEAR.php';
100 $this->_byte_order =
'';
102 $this->_datasize = 0;
103 $this->_limit = 2080;
104 $this->_tmp_dir =
'';
118 $teststr = pack(
"d", 1.2345);
119 $number = pack(
"C8", 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F);
120 if ($number == $teststr) {
122 } elseif ($number == strrev($teststr)){
126 return $this->
raiseError(
"Required floating point format ".
127 "not supported on this platform.");
129 $this->_byte_order = $byte_order;
140 if (strlen(
$data) > $this->_limit) {
143 $this->_data =
$data.$this->_data;
144 $this->_datasize += strlen(
$data);
155 if (strlen(
$data) > $this->_limit) {
158 $this->_data = $this->_data.$data;
159 $this->_datasize += strlen(
$data);
176 if ($this->_BIFF_version == 0x0500) {
181 } elseif ($this->_BIFF_version == 0x0600) {
183 $unknown = pack(
"VV", 0x00000041, 0x00000006);
189 $header = pack(
"vv", $record, $length);
190 $data = pack(
"vvvv", $version, $type, $build, $year);
203 $header = pack(
"vv", $record, $length);
226 $tmp = substr(
$data, 0, 2).pack(
"v", $limit-4).substr(
$data, 4, $limit - 4);
228 $header = pack(
"vv", $record, $limit);
231 $data_length = strlen(
$data);
232 for ($i = $limit; $i < ($data_length - $limit); $i += $limit) {
234 $tmp .= substr(
$data, $i, $limit);
238 $header = pack(
"vv", $record, strlen(
$data) - $i);
240 $tmp .= substr(
$data, $i, strlen(
$data) - $i);
255 $this->_tmp_dir = $dir;
_prepend($data)
General storage function.
_addContinue($data)
Excel limits the size of BIFF records.
_storeEof()
Writes Excel EOF record to indicate the end of a BIFF stream.
setTempDir($dir)
Sets the temp dir used for storing the OLE file.
_storeBof($type)
Writes Excel BOF record to indicate the beginning of a stream or sub-stream in the BIFF file...
& raiseError($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false)
This method is a wrapper that returns an instance of the configured error class with this object's de...
Spreadsheet_Excel_Writer_BIFFwriter()
Constructor.
_setByteOrder()
Determine the byte order and store it as class data to avoid recalculating it for each call to new()...
_append($data)
General storage function.