$_data
$_data : string
The string containing the data of the BIFF stream
PHPExcel_Writer_Excel5_Workbook
Copyright (c) 2006 - 2015 PHPExcel
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
$parser : \PHPExcel_Writer_Excel5_Parser
Formula parser
$xfWriters : array<mixed,\PHPExcel_Writer_Excel5_Xf>
XF Writers
$phpExcel : \PHPExcel
Workbook
$fontWriters : array<mixed,\PHPExcel_Writer_Excel5_Font>
Fonts writers
$escher : \PHPExcel_Shared_Escher
Escher object corresponding to MSODRAWINGGROUP
__construct(\PHPExcel $phpExcel = null, $str_total, $str_unique, $str_table, $colors, mixed $parser)
Class constructor
\PHPExcel | $phpExcel | The Workbook |
$str_total | ||
$str_unique | ||
$str_table | ||
$colors | ||
mixed | $parser | The formula parser created for the Workbook |
addFont(\PHPExcel_Style_Font $font) : integer
Add a font to added fonts
\PHPExcel_Style_Font | $font |
Index to FONT record
getEscher() : \PHPExcel_Shared_Escher
Get Escher object
setEscher(\PHPExcel_Shared_Escher $pValue = null)
Set Escher object
\PHPExcel_Shared_Escher | $pValue |
addContinue(string $data) : string
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.
string | $data | The original binary data to be written |
A very convenient string of continue blocks
writeDefinedNameBiff8(string $name, string $formulaData, string $sheetIndex, boolean $isBuiltIn = false) : string
Write a DEFINEDNAME record for BIFF8 using explicit binary formula data
string | $name | The name in UTF-8 |
string | $formulaData | The binary formula data |
string | $sheetIndex | 1-based sheet index the defined name applies to. 0 = global |
boolean | $isBuiltIn | Built-in name? |
Complete binary record data
writeShortNameBiff8(string $name, string $sheetIndex, array<mixed,integer[]> $rangeBounds, boolean $isHidden = false) : string
Write a short NAME record
string | $name | |
string | $sheetIndex | 1-based sheet index the defined name applies to. 0 = global |
array<mixed,integer[]> | $rangeBounds | range boundaries |
boolean | $isHidden |
Complete binary record data
writeBoundSheet(\PHPExcel_Worksheet $sheet, integer $offset)
Writes Excel BIFF BOUNDSHEET record.
\PHPExcel_Worksheet | $sheet | Worksheet name |
integer | $offset | Location of worksheet BOF |
writeExternalCount(integer $cxals)
Write BIFF record EXTERNCOUNT to indicate the number of external sheet references in the workbook.
Excel only stores references to external sheets that are used in NAME. The workbook NAME record is required to define the print area and the repeat rows and columns.
A similar method is used in Worksheet.php for a slightly different purpose.
integer | $cxals | Number of external references |
writeExternalSheet(string $sheetname)
Writes the Excel BIFF EXTERNSHEET record. These references are used by formulas. NAME record is required to define the print area and the repeat rows and columns.
A similar method is used in Worksheet.php for a slightly different purpose.
string | $sheetname | Worksheet name |
writeNameShort(integer $index, integer $type, integer $rowmin, integer $rowmax, integer $colmin, integer $colmax)
Store the NAME record in the short format that is used for storing the print area, repeat rows only and repeat columns only.
integer | $index | Sheet index |
integer | $type | Built-in name type |
integer | $rowmin | Start row |
integer | $rowmax | End row |
integer | $colmin | Start colum |
integer | $colmax | End column |
writeNameLong(integer $index, integer $type, integer $rowmin, integer $rowmax, integer $colmin, integer $colmax)
Store the NAME record in the long format that is used for storing the repeat rows and columns when both are specified. This shares a lot of code with writeNameShort() but we use a separate method to keep the code clean.
Code abstraction for reuse can be carried too far, and I should know. ;-)
integer | $index | Sheet index |
integer | $type | Built-in name type |
integer | $rowmin | Start row |
integer | $rowmax | End row |
integer | $colmin | Start colum |
integer | $colmax | End column |
writeSharedStringsTable() : string
Handling of the SST continue blocks is complicated by the need to include an additional continuation byte depending on whether the string is split between blocks or whether it starts at the beginning of the block. (There are also additional complications that will arise later when/if Rich Strings are supported).
The Excel documentation says that the SST record should be followed by an EXTSST record. The EXTSST record is a hash table that is used to optimise access to SST. However, despite the documentation it doesn't seem to be required so we will ignore it.
Binary data