XLS_BIFF8
XLS_BIFF8 = 0x600
$readDataOnly : bool
Read data only? Identifies whether the Reader should only read data values for cells, and ignore any formatting information; or whether it should read both data and formatting.
$readEmptyCells : bool
Read empty cells? Identifies whether the Reader should read data values for cells all cells, or should ignore cells containing null value or empty string.
$includeCharts : bool
Read charts that are defined in the workbook? Identifies whether the Reader should read the definitions for any charts that exist in the workbook;.
$loadSheetsOnly : array
Restrict which sheets should be loaded? This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded.
$readFilter : \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
IReadFilter instance.
$securityScanner : \PhpOffice\PhpSpreadsheet\Reader\Security\XmlScanner
$summaryInformation : string
Summary Information stream data.
$documentSummaryInformation : string
Extended Summary Information stream data.
$data : string
Workbook stream data. (Includes workbook globals substream as well as sheet substreams).
$dataSize : int
Size in bytes of $this->data.
$pos : int
Current position in stream.
$spreadsheet : \PhpOffice\PhpSpreadsheet\Spreadsheet
Workbook to be returned by the reader.
$phpSheet : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Worksheet that is currently being built by the reader.
$version : int
BIFF version.
$codepage : string
Codepage set in the Excel file being read. Only important for BIFF5 (Excel 5.0 - Excel 95) For BIFF8 (Excel 97 - Excel 2003) this will always have the value 'UTF-16LE'.
$formats : array
Shared formats.
$objFonts : array
Shared fonts.
$palette : array
Color palette.
$sheets : array
Worksheets.
$externalBooks : array
External books.
$ref : array
REF structures. Only applies to BIFF8.
$externalNames : array
External names.
$definedname : array
Defined names.
$sst : array
Shared strings. Only applies to BIFF8.
$frozen : bool
Panes are frozen? (in sheet currently being read). See WINDOW2 record.
$isFitToPages : bool
Fit printout to number of pages? (in sheet currently being read). See SHEETPR record.
$objs : array
Objects. One OBJ record contributes with one entry.
$textObjects : array
Text Objects. One TXO record corresponds with one entry.
$cellNotes : array
Cell Annotations (BIFF8).
$drawingGroupData : string
The combined MSODRAWINGGROUP data.
$drawingData : string
The combined MSODRAWING data (per sheet).
$xfIndex : int
Keep track of XF index.
$mapCellXfIndex : array
Mapping of XF index (that is a cell XF) to final index in cellXf collection.
$mapCellStyleXfIndex : array
Mapping of XF index (that is a style XF) to final index in cellStyleXf collection.
$sharedFormulas : array
The shared formulas in a sheet. One SHAREDFMLA record contributes with one value.
$sharedFormulaParts : array
The shared formula parts in a sheet. One FORMULA record contributes with one value if it refers to a shared formula.
$encryption : int
The type of encryption in use.
$encryptionStartPos : int
The position in the stream after which contents are encrypted.
$rc4Key : \PhpOffice\PhpSpreadsheet\Reader\Xls\RC4
The current RC4 decryption object.
$rc4Pos : int
The position in the stream that the RC4 decryption object was left at.
$md5Ctxt : string
The current MD5 context state.
$textObjRef : int
$baseCell : string
setReadDataOnly(mixed $pValue) : \PhpOffice\PhpSpreadsheet\Reader\IReader
Set read data only Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information.
Set to false (the default) to advise the Reader to read both data and formatting for cells.
mixed | $pValue |
setReadEmptyCells(mixed $pValue) : \PhpOffice\PhpSpreadsheet\Reader\IReader
Set read empty cells Set to true (the default) to advise the Reader read data values for all cells, irrespective of value.
Set to false to advise the Reader to ignore cells containing a null value or an empty string.
mixed | $pValue |
getIncludeCharts() : bool
Read charts in workbook? If this is true, then the Reader will include any charts that exist in the workbook.
Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. If false (the default) it will ignore any charts defined in the workbook file.
setIncludeCharts(mixed $pValue) : \PhpOffice\PhpSpreadsheet\Reader\IReader
Set read charts in workbook Set to true, to advise the Reader to include any charts that exist in the workbook.
Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. Set to false (the default) to discard charts.
mixed | $pValue |
setLoadSheetsOnly(mixed $value) : \PhpOffice\PhpSpreadsheet\Reader\IReader
Set which sheets to load.
mixed | $value | This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name. If NULL, then it tells the Reader to read all worksheets in the workbook |
readFilepass() : void
FILEPASS.
This record is part of the File Protection Block. It contains information about the read/write password of the file. All record contents following this record will be encrypted.
-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"
The decryption functions and objects used from here on in are based on the source of Spreadsheet-ParseExcel: https://metacpan.org/release/Spreadsheet-ParseExcel
verifyPassword(string $password, string $docid, string $salt_data, string $hashedsalt_data, string $valContext) : bool
Verify RC4 file password.
string | $password | Password to check |
string | $docid | Document id |
string | $salt_data | Salt data |
string | $hashedsalt_data | Hashed salt data |
string | $valContext | Set to the MD5 context of the value |
Success
readDateMode() : void
DATEMODE.
This record specifies the base date for displaying date values. All dates are stored as count of days past this base date. In BIFF2-BIFF4 this record is part of the Calculation Settings Block. In BIFF5-BIFF8 it is stored in the Workbook Globals Substream.
-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"
readFormat() : void
FORMAT.
This record contains information about a number format. All FORMAT records occur together in a sequential list.
In BIFF2-BIFF4 other records referencing a FORMAT record contain a zero-based index into this list. From BIFF5 on the FORMAT record contains the index itself that will be used by other records.
-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"
readXf() : void
XF - Extended Format.
This record contains formatting information for cells, rows, columns or styles. According to https://support.microsoft.com/en-us/help/147732 there are always at least 15 cell style XF and 1 cell XF. Inspection of Excel files generated by MS Office Excel shows that XF records 0-14 are cell style XF and XF record 15 is a cell XF We only read the first cell style XF and skip the remaining cell style XF records We read all cell XF records.
-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"
readSheet() : void
SHEET.
This record is located in the Workbook Globals Substream and represents a sheet inside the workbook. One SHEET record is written for each sheet. It stores the sheet name and a stream offset to the BOF record of the respective Sheet Substream within the Workbook Stream.
-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"
readDefinedName() : void
DEFINEDNAME.
This record is part of a Link Table. It contains the name and the token array of an internal defined name. Token arrays of defined names contain tokens with aberrant token classes.
-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"
readRk() : void
Read RK record This record represents a cell that contains an RK value (encoded integer or floating-point value). If a floating-point value cannot be encoded to an RK value, a NUMBER record will be written. This record replaces the record INTEGER written in BIFF2.
-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"
readString() : string
Read a STRING record from current stream position and advance the stream pointer to next record This record is used for storing result from FORMULA record when it is a string, and it occurs directly after the FORMULA record.
The string contents as UTF-8
readLabel() : void
Read LABEL record This record represents a cell that contains a string. In BIFF8 it is usually replaced by the LABELSST record.
Excel still uses this record, if it copies unformatted text cells to the clipboard.
-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"
getSplicedRecordData() : array
Reads a record from current position in data stream and continues reading data as long as CONTINUE records are found. Splices the record data pieces and returns the combined string as if record data is in one piece.
Moves to next current position in data stream to start of next record different from a CONtINUE record.
getFormulaFromStructure(string $formulaStructure, string $baseCell = 'A1') : string
Convert formula structure into human readable Excel formula like 'A3+A5*5'.
string | $formulaStructure | The complete binary data for the formula |
string | $baseCell | Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas |
Human readable formula
getFormulaFromData(string $formulaData, string $additionalData = '', string $baseCell = 'A1') : string
Take formula data and additional data for formula and return human readable formula.
string | $formulaData | The binary data for the formula itself |
string | $additionalData | Additional binary data going with the formula |
string | $baseCell | Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas |
Human readable formula
createFormulaFromTokens(array $tokens, string $additionalData) : string
Take array of tokens together with additional data for formula and return human readable formula.
array | $tokens | |
string | $additionalData | Additional binary data going with the formula |
Human readable formula
readBIFF8CellAddressB(string $cellAddressStructure, string $baseCell = 'A1') : string
Reads a cell address in BIFF8 for shared formulas. Uses positive and negative values for row and column to indicate offsets from a base cell section 3.3.4.
string | $cellAddressStructure | |
string | $baseCell | Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas |
readBIFF8CellRangeAddressB(string $subData, string $baseCell = 'A1') : string
Reads a cell range address in BIFF8 for shared formulas. Uses positive and negative values for row and column to indicate offsets from a base cell section 3.3.4.
string | $subData | |
string | $baseCell | Base cell |
Cell range address
readSheetRangeByRefIndex(int $index) : false|string
Get a sheet range like Sheet1:Sheet3 from REF index Note: If there is only one sheet in the range, one gets e.g Sheet1 It can also happen that the REF structure uses the -1 (FFFF) code to indicate deleted sheets, in which case an Exception is thrown.
int | $index |
readUnicodeStringLong(string $subData) : array
Extracts an Excel Unicode long string (16-bit string length) OpenOffice documentation: 2.5.3 this function is under construction, needs to support rich text, and Asian phonetic settings.
string | $subData |
readUnicodeString(string $subData, int $characterCount) : array
Read Unicode string with no string length field, but with known character count this function is under construction, needs to support rich text, and Asian phonetic settings OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.3.
string | $subData | |
int | $characterCount |