XLS_BIFF8
XLS_BIFF8 = 1536
$readFilter : \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
IReadFilter instance.
$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.
$rc4Key : \PhpOffice\PhpSpreadsheet\Reader\Xls\RC4
The current RC4 decryption object.
setReadDataOnly(boolean $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.
boolean | $pValue |
setReadEmptyCells(boolean $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.
boolean | $pValue |
getIncludeCharts() : boolean
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(boolean $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.
boolean | $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 |
setLoadAllSheets() : \PhpOffice\PhpSpreadsheet\Reader\IReader
Set all sheets to load Tells the Reader to load all worksheets from the workbook.
getReadFilter() : \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
Read filter.
setReadFilter(\PhpOffice\PhpSpreadsheet\Reader\IReadFilter $pValue) : \PhpOffice\PhpSpreadsheet\Reader\IReader
Set read filter.
\PhpOffice\PhpSpreadsheet\Reader\IReadFilter | $pValue |
load(string $pFilename) : \PhpOffice\PhpSpreadsheet\Spreadsheet
Loads PhpSpreadsheet from file.
string | $pFilename |
readFilepass()
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: http://search.cpan.org/~jmcnamara/Spreadsheet-ParseExcel/
makeKey(integer $block, string $valContext) : \PhpOffice\PhpSpreadsheet\Reader\Xls\RC4
Make an RC4 decryptor for the given block.
integer | $block | Block for which to create decrypto |
string | $valContext | MD5 context state |
verifyPassword(string $password, string $docid, string $salt_data, string $hashedsalt_data, string $valContext) : boolean
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()
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()
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()
XF - Extended Format.
This record contains formatting information for cells, rows, columns or styles. According to http://support.microsoft.com/kb/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()
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()
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()
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()
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
getNextToken(string $formulaData, string $baseCell = 'A1') : array
Fetch next token from binary formula data.
string | $formulaData | Formula data |
string | $baseCell | Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas |
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(integer $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.
integer | $index |
readUnicodeString(string $subData, integer $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 | |
integer | $characterCount |