function PHPExcel_Writer_Excel5_Workbook::_calcSheetOffsets in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Workbook.php \PHPExcel_Writer_Excel5_Workbook::_calcSheetOffsets()
* Calculate offsets for Worksheet BOF records. * * @access private
1 call to PHPExcel_Writer_Excel5_Workbook::_calcSheetOffsets()
- PHPExcel_Writer_Excel5_Workbook::writeWorkbook in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Workbook.php - * Assemble worksheets into a workbook and send the BIFF data to an OLE * storage. * *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Workbook.php, line 480
Class
- PHPExcel_Writer_Excel5_Workbook
- PHPExcel_Writer_Excel5_Workbook
Code
function _calcSheetOffsets() {
$boundsheet_length = 10;
// fixed length for a BOUNDSHEET record
// size of Workbook globals part 1 + 3
$offset = $this->_datasize;
// add size of Workbook globals part 2, the length of the SHEET records
$total_worksheets = count($this->_phpExcel
->getAllSheets());
foreach ($this->_phpExcel
->getWorksheetIterator() as $sheet) {
$offset += $boundsheet_length + strlen(PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($sheet
->getTitle()));
}
// add the sizes of each of the Sheet substreams, respectively
for ($i = 0; $i < $total_worksheets; ++$i) {
$this->_worksheetOffsets[$i] = $offset;
$offset += $this->_worksheetSizes[$i];
}
$this->_biffsize = $offset;
}