public function PHPExcel_Writer_Excel5_Workbook::writeWorkbook in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Workbook.php \PHPExcel_Writer_Excel5_Workbook::writeWorkbook()
* Assemble worksheets into a workbook and send the BIFF data to an OLE * storage. * *
Parameters
array $pWorksheetSizes The sizes in bytes of the binary worksheet streams: * @return string Binary data for workbook stream
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Workbook.php, line 426
Class
- PHPExcel_Writer_Excel5_Workbook
- PHPExcel_Writer_Excel5_Workbook
Code
public function writeWorkbook($pWorksheetSizes = null) {
$this->_worksheetSizes = $pWorksheetSizes;
// Calculate the number of selected worksheet tabs and call the finalization
// methods for each worksheet
$total_worksheets = $this->_phpExcel
->getSheetCount();
// Add part 1 of the Workbook globals, what goes before the SHEET records
$this
->_storeBof(0x5);
$this
->_writeCodepage();
$this
->_writeWindow1();
$this
->_writeDatemode();
$this
->_writeAllFonts();
$this
->_writeAllNumFormats();
$this
->_writeAllXfs();
$this
->_writeAllStyles();
$this
->_writePalette();
// Prepare part 3 of the workbook global stream, what goes after the SHEET records
$part3 = '';
if ($this->_country_code != -1) {
$part3 .= $this
->_writeCountry();
}
$part3 .= $this
->_writeRecalcId();
$part3 .= $this
->_writeSupbookInternal();
/* TODO: store external SUPBOOK records and XCT and CRN records
in case of external references for BIFF8 */
$part3 .= $this
->_writeExternsheetBiff8();
$part3 .= $this
->_writeAllDefinedNamesBiff8();
$part3 .= $this
->_writeMsoDrawingGroup();
$part3 .= $this
->_writeSharedStringsTable();
$part3 .= $this
->writeEof();
// Add part 2 of the Workbook globals, the SHEET records
$this
->_calcSheetOffsets();
for ($i = 0; $i < $total_worksheets; ++$i) {
$this
->_writeBoundsheet($this->_phpExcel
->getSheet($i), $this->_worksheetOffsets[$i]);
}
// Add part 3 of the Workbook globals
$this->_data .= $part3;
return $this->_data;
}