$_data
$_data : string
The string containing the data of the BIFF stream.
$_data : string
The string containing the data of the BIFF stream.
$_datasize : int
The size of the data in bytes. Should be the same as strlen($this->_data).
$byteOrder : int
The byte order of this architecture. 0 => little endian, 1 => big endian.
$limit : int
The maximum length for a BIFF record (excluding record header and length field). See addContinue().
$parser : \PhpOffice\PhpSpreadsheet\Writer\Xls\Parser
Formula parser.
$biffSize : int
The BIFF file size for the workbook.
$xfWriters : \PhpOffice\PhpSpreadsheet\Writer\Xls\Xf[]
XF Writers.
$palette : array
Array containing the colour palette.
$codepage : int
The codepage indicates the text encoding used for strings.
$countryCode : int
The country code used for localization.
$spreadsheet : \PhpOffice\PhpSpreadsheet\Spreadsheet
Workbook.
$fontWriters : \PhpOffice\PhpSpreadsheet\Writer\Xls\Font[]
Fonts writers.
$addedFonts : array
Added fonts. Maps from font's hash => index in workbook.
$numberFormats : array
Shared number formats.
$addedNumberFormats : array
Added number formats. Maps from numberFormat's hash => index in workbook.
$worksheetSizes : array
Sizes of the binary worksheet streams.
$worksheetOffsets : array
Offsets of the binary worksheet streams relative to the start of the global workbook stream.
$stringTotal : int
Total number of shared strings in workbook.
$stringUnique : int
Number of unique shared strings in workbook.
$stringTable : array
Array of unique shared strings in workbook.
$escher : \PhpOffice\PhpSpreadsheet\Shared\Escher
Escher object corresponding to MSODRAWINGGROUP.
__construct(\PhpOffice\PhpSpreadsheet\Spreadsheet $spreadsheet, int $str_total, int $str_unique, array $str_table, array $colors, \PhpOffice\PhpSpreadsheet\Writer\Xls\Parser $parser) : mixed
Class constructor.
\PhpOffice\PhpSpreadsheet\Spreadsheet | $spreadsheet | The Workbook |
int | $str_total | Total number of strings |
int | $str_unique | Total number of unique strings |
array | $str_table | String Table |
array | $colors | Colour Table |
\PhpOffice\PhpSpreadsheet\Writer\Xls\Parser | $parser | The formula parser created for the Workbook |
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, int $sheetIndex, bool $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 |
int | $sheetIndex | 1-based sheet index the defined name applies to. 0 = global |
bool | $isBuiltIn | Built-in name? |
Complete binary record data
writeShortNameBiff8(string $name, string $sheetIndex, int[][] $rangeBounds, bool $isHidden = false) : string
Write a short NAME record.
string | $name | |
string | $sheetIndex | 1-based sheet index the defined name applies to. 0 = global |
int[][] | $rangeBounds | range boundaries |
bool | $isHidden |
Complete binary record data
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