private function PHPExcel_Reader_Excel5::_readBof in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php \PHPExcel_Reader_Excel5::_readBof()
* Read BOF
3 calls to PHPExcel_Reader_Excel5::_readBof()
- PHPExcel_Reader_Excel5::listWorksheetInfo in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel5.php - * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns) * *
- PHPExcel_Reader_Excel5::listWorksheetNames in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel5.php - * Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object * *
- PHPExcel_Reader_Excel5::load in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel5.php - * Loads PHPExcel from file * *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel5.php, line 1619
Class
- PHPExcel_Reader_Excel5
- PHPExcel_Reader_Excel5
Code
private function _readBof() {
$length = self::_GetInt2d($this->_data, $this->_pos + 2);
$recordData = substr($this->_data, $this->_pos + 4, $length);
// move stream pointer to next record
$this->_pos += 4 + $length;
// offset: 2; size: 2; type of the following data
$substreamType = self::_GetInt2d($recordData, 2);
switch ($substreamType) {
case self::XLS_WorkbookGlobals:
$version = self::_GetInt2d($recordData, 0);
if ($version != self::XLS_BIFF8 && $version != self::XLS_BIFF7) {
throw new PHPExcel_Reader_Exception('Cannot read this Excel file. Version is too old.');
}
$this->_version = $version;
break;
case self::XLS_Worksheet:
// do not use this version information for anything
// it is unreliable (OpenOffice doc, 5.8), use only version information from the global stream
break;
default:
// substream, e.g. chart
// just skip the entire substream
do {
$code = self::_GetInt2d($this->_data, $this->_pos);
$this
->_readDefault();
} while ($code != self::XLS_Type_EOF && $this->_pos < $this->_dataSize);
break;
}
}