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V9K*ZĐ @i%O4;:"ۢScA|r_EJϨ_ow)qyYەR|p ֹyI ͩX\g.gٟj}Lapv"\uAGY&-/5k~*Ӱ=)Gٞv޿&Gubz3v:[Ynᣇ^JAC#q2T,}E/Cnn%}m Q27Ƞl-U?05Zg(Լ9wms6^ Xϋk=rMn;WG< &4w_8rVěMp^mY0Hȱ, O_&/x⃲O0|Eȴjrj!fG2Aߊ}/g=ۮc^oy5.L6ӱy@0~5%Gcv/whBe7x03okG׹d_H2Teb`M5J^E{]wص] c:WSz]@zq) I[蛍vw88=~敕TUXN `v(bŒ7\ب[Y[8z # { if (strlen($data) - 4 > $this->limit) { $data = $this->addContinue($data); } $this->_datasize += strlen($data); return $data; } /** * Writes Excel BOF record to indicate the beginning of a stream or * sub-stream in the BIFF file. * * @param int $type type of BIFF file to write: 0x0005 Workbook, * 0x0010 Worksheet */ protected function storeBof($type): void { $record = 0x0809; // Record identifier (BIFF5-BIFF8) $length = 0x0010; // by inspection of real files, MS Office Excel 2007 writes the following $unknown = pack('VV', 0x000100D1, 0x00000406); $build = 0x0DBB; // Excel 97 $year = 0x07CC; // Excel 97 $version = 0x0600; // BIFF8 $header = pack('vv', $record, $length); $data = pack('vvvv', $version, $type, $build, $year); $this->append($header . $data . $unknown); } /** * Writes Excel EOF record to indicate the end of a BIFF stream. */ protected function storeEof(): void { $record = 0x000A; // Record identifier $length = 0x0000; // Number of bytes to follow $header = pack('vv', $record, $length); $this->append($header); } /** * Writes Excel EOF record to indicate the end of a BIFF stream. */ public function writeEof(): string { $record = 0x000A; // Record identifier $length = 0x0000; // Number of bytes to follow $header = pack('vv', $record, $length); return $this->writeData($header); } /** * 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. * * @param string $data The original binary data to be written * * @return string A very convenient string of continue blocks */ private function addContinue($data) { $limit = $this->limit; $record = 0x003C; // Record identifier // The first 2080/8224 bytes remain intact. However, we have to change // the length field of the record. $tmp = substr($data, 0, 2) . pack('v', $limit) . substr($data, 4, $limit); $header = pack('vv', $record, $limit); // Headers for continue records // Retrieve chunks of 2080/8224 bytes +4 for the header. $data_length = strlen($data); for ($i = $limit + 4; $i < ($data_length - $limit); $i += $limit) { $tmp .= $header; $tmp .= substr($data, $i, $limit); } // Retrieve the last chunk of data $header = pack('vv', $record, strlen($data) - $i); $tmp .= $header; $tmp .= substr($data, $i); return $tmp; } }