Documentation

ListFunctions extends Xls
in package

Table of Contents

Constants

BORDER_STYLE_MAP  = [ \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_NONE, // => 0x00, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN, // => 0x01, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUM, // => 0x02, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHED, // => 0x03, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DOTTED, // => 0x04, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK, // => 0x05, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DOUBLE, // => 0x06, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_HAIR, // => 0x07, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHED, // => 0x08, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHDOT, // => 0x09, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHDOT, // => 0x0A, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHDOTDOT, // => 0x0B, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHDOTDOT, // => 0x0C, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_SLANTDASHDOT, // => 0x0D, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_OMIT, // => 0x0E, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_OMIT, ]
MS_BIFF_CRYPTO_NONE  = 0
MS_BIFF_CRYPTO_RC4  = 2
MS_BIFF_CRYPTO_XOR  = 1
REKEY_BLOCK  = 0x400
XLS_BIFF7  = 0x500
XLS_BIFF8  = 0x600
XLS_TYPE_ARRAY  = 0x221
XLS_TYPE_BLANK  = 0x201
XLS_TYPE_BOF  = 0x809
XLS_TYPE_BOOLERR  = 0x205
XLS_TYPE_BOTTOMMARGIN  = 0x29
XLS_TYPE_CFHEADER  = 0x1b0
XLS_TYPE_CFRULE  = 0x1b1
XLS_TYPE_CODEPAGE  = 0x42
XLS_TYPE_COLINFO  = 0x7d
XLS_TYPE_CONTINUE  = 0x3c
XLS_TYPE_DATAVALIDATION  = 0x1be
XLS_TYPE_DATAVALIDATIONS  = 0x1b2
XLS_TYPE_DATEMODE  = 0x22
XLS_TYPE_DBCELL  = 0xd7
XLS_TYPE_DEFAULTROWHEIGHT  = 0x225
XLS_TYPE_DEFCOLWIDTH  = 0x55
XLS_TYPE_DEFINEDNAME  = 0x18
XLS_TYPE_DIMENSION  = 0x200
XLS_TYPE_EOF  = 0xa
XLS_TYPE_EXTERNALBOOK  = 0x1ae
XLS_TYPE_EXTERNNAME  = 0x23
XLS_TYPE_EXTERNSHEET  = 0x17
XLS_TYPE_EXTSST  = 0xff
XLS_TYPE_FILEPASS  = 0x2f
XLS_TYPE_FONT  = 0x31
XLS_TYPE_FOOTER  = 0x15
XLS_TYPE_FORMAT  = 0x41e
XLS_TYPE_FORMULA  = 0x6
XLS_TYPE_HCENTER  = 0x83
XLS_TYPE_HEADER  = 0x14
XLS_TYPE_HORIZONTALPAGEBREAKS  = 0x1b
XLS_TYPE_HYPERLINK  = 0x1b8
XLS_TYPE_IMDATA  = 0x7f
XLS_TYPE_INDEX  = 0x20b
XLS_TYPE_LABEL  = 0x204
XLS_TYPE_LABELSST  = 0xfd
XLS_TYPE_LEFTMARGIN  = 0x26
XLS_TYPE_MERGEDCELLS  = 0xe5
XLS_TYPE_MSODRAWING  = 0xec
XLS_TYPE_MSODRAWINGGROUP  = 0xeb
XLS_TYPE_MULBLANK  = 0xbe
XLS_TYPE_MULRK  = 0xbd
XLS_TYPE_NOTE  = 0x1c
XLS_TYPE_NUMBER  = 0x203
XLS_TYPE_OBJ  = 0x5d
XLS_TYPE_OBJECTPROTECT  = 0x63
XLS_TYPE_PAGELAYOUTVIEW  = 0x88b
XLS_TYPE_PAGESETUP  = 0xa1
XLS_TYPE_PALETTE  = 0x92
XLS_TYPE_PANE  = 0x41
XLS_TYPE_PASSWORD  = 0x13
XLS_TYPE_PRINTGRIDLINES  = 0x2b
XLS_TYPE_PROTECT  = 0x12
XLS_TYPE_RANGEPROTECTION  = 0x868
XLS_TYPE_RIGHTMARGIN  = 0x27
XLS_TYPE_RK  = 0x27e
XLS_TYPE_ROW  = 0x208
XLS_TYPE_SCENPROTECT  = 0xdd
XLS_TYPE_SCL  = 0xa0
XLS_TYPE_SELECTION  = 0x1d
XLS_TYPE_SHAREDFMLA  = 0x4bc
XLS_TYPE_SHEET  = 0x85
XLS_TYPE_SHEETLAYOUT  = 0x862
XLS_TYPE_SHEETPR  = 0x81
XLS_TYPE_SHEETPROTECTION  = 0x867
XLS_TYPE_SST  = 0xfc
XLS_TYPE_STRING  = 0x207
XLS_TYPE_STYLE  = 0x293
XLS_TYPE_TOPMARGIN  = 0x28
XLS_TYPE_TXO  = 0x1b6
XLS_TYPE_UNKNOWN  = 0xffff
XLS_TYPE_VCENTER  = 0x84
XLS_TYPE_VERTICALPAGEBREAKS  = 0x1a
XLS_TYPE_WINDOW2  = 0x23e
XLS_TYPE_XF  = 0xe0
XLS_TYPE_XFEXT  = 0x87d
XLS_WORKBOOKGLOBALS  = 0x5
XLS_WORKSHEET  = 0x10
FC000000  = 0xfc << 24
FE000000  = 0xfe << 24
HIGH_ORDER_BIT  = 0x80 << 24

Properties

$activeSheetSet  : bool
$baseCell  : string
$cellNotes  : array<string|int, mixed>
Cell Annotations (BIFF8).
$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'.
$data  : string
Workbook stream data. (Includes workbook globals substream as well as sheet substreams).
$dataSize  : int
Size in bytes of $this->data.
$definedname  : array<string|int, mixed>
Defined names.
$documentSummaryInformation  : string|null
Extended Summary Information stream data.
$drawingData  : string
The combined MSODRAWING data (per sheet).
$drawingGroupData  : string
The combined MSODRAWINGGROUP data.
$encryption  : int
The type of encryption in use.
$encryptionStartPos  : int
The position in the stream after which contents are encrypted.
$externalBooks  : array<string|int, mixed>
External books.
$externalNames  : array<string|int, mixed>
External names.
$fileHandle  : resource
$formats  : array<string|int, mixed>
Shared formats.
$frozen  : bool
Panes are frozen? (in sheet currently being read). See WINDOW2 record.
$ignoreRowsWithNoCells  : bool
Ignore rows with no cells? Identifies whether the Reader should ignore rows with no cells.
$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;.
$isFitToPages  : bool
Fit printout to number of pages? (in sheet currently being read). See SHEETPR record.
$loadSheetsOnly  : null|array<string|int, string>
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.
$mapCellStyleXfIndex  : array<string|int, mixed>
Mapping of XF index (that is a style XF) to final index in cellStyleXf collection.
$mapCellXfIndex  : array<string|int, mixed>
Mapping of XF index (that is a cell XF) to final index in cellXf collection.
$objFonts  : array<string|int, Font>
Shared fonts.
$objs  : array<string|int, mixed>
Objects. One OBJ record contributes with one entry.
$palette  : array<string|int, mixed>
Color palette.
$phpSheet  : Worksheet
Worksheet that is currently being built by the reader.
$pos  : int
Current position in stream.
$rc4Key  : RC4|null
The current RC4 decryption object.
$rc4Pos  : int
The position in the stream that the RC4 decryption object was left at.
$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 all cells, or should ignore cells containing null value or empty string.
$readFilter  : IReadFilter
IReadFilter instance.
$ref  : array<string|int, mixed>
REF structures. Only applies to BIFF8.
$securityScanner  : XmlScanner|null
$sharedFormulaParts  : array<string|int, mixed>
The shared formula parts in a sheet. One FORMULA record contributes with one value if it refers to a shared formula.
$sharedFormulas  : array<string|int, mixed>
The shared formulas in a sheet. One SHAREDFMLA record contributes with one value.
$sheets  : array<string|int, mixed>
Worksheets.
$spreadsheet  : Spreadsheet
Workbook to be returned by the reader.
$sst  : array<string|int, mixed>
Shared strings. Only applies to BIFF8.
$summaryInformation  : string|null
Summary Information stream data.
$textObjects  : array<string|int, mixed>
Text Objects. One TXO record corresponds with one entry.
$textObjRef  : int
$valueBinder  : IValueBinder|null
$version  : int
BIFF version.
$xfIndex  : int
Keep track of XF index.
$md5Ctxt  : string
The current MD5 context state.

Methods

__construct()  : mixed
canRead()  : bool
Can the current IReader read the file?
getCodepage()  : string
getIgnoreRowsWithNoCells()  : bool
getIncludeCharts()  : bool
Read charts in workbook? If this is true, then the Reader will include any charts that exist in the workbook.
getInt2d()  : int
Read 16-bit signed integer.
getInt4d()  : int
Read 32-bit signed integer.
getLoadSheetsOnly()  : array<string|int, mixed>|null
Get which sheets to load Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null indicating that all worksheets in the workbook should be loaded.
getMapCellStyleXfIndex()  : array<string|int, mixed>
Phpstan 1.4.4 complains that this property is never read.
getReadDataOnly()  : bool
Read data only? If this is true, then the Reader will only read data values for cells, it will not read any formatting or structural information (like merges).
getReadEmptyCells()  : bool
Read empty cells? If this is true (the default), then the Reader will read data values for all cells, irrespective of value.
getReadFilter()  : IReadFilter
Read filter.
getSecurityScanner()  : XmlScanner|null
getSecurityScannerOrThrow()  : XmlScanner
getUInt2d()  : int
Read 16-bit unsigned integer.
getValueBinder()  : IValueBinder|null
getVersion()  : int
listWorksheetInfo()  : array<string|int, mixed>
Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).
listWorksheetNames()  : array<string|int, mixed>
Reads names of the worksheets from a file, without parsing the whole file to a PhpSpreadsheet object.
load()  : Spreadsheet
Loads Spreadsheet from file.
setCodepage()  : void
setIgnoreRowsWithNoCells()  : self
setIncludeCharts()  : $this
Set read charts in workbook Set to true, to advise the Reader to include any charts that exist in the workbook.
setLoadAllSheets()  : $this
Set all sheets to load Tells the Reader to load all worksheets from the workbook.
setLoadSheetsOnly()  : $this
Set which sheets to load.
setReadDataOnly()  : $this
Set read data only Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting or structural information (like merges).
setReadEmptyCells()  : $this
Set read empty cells Set to true (the default) to advise the Reader read data values for all cells, irrespective of value.
setReadFilter()  : $this
Set read filter.
setValueBinder()  : self
decodeCodepage()  : string
Convert string to UTF-8. Only used for BIFF5.
encodeUTF16()  : string
Get UTF-8 string from (compressed or uncompressed) UTF-16 string.
extractNumber()  : int|float
Reads first 8 bytes of a string and return IEEE 754 float.
getFormulaFromStructure()  : string
Convert formula structure into human readable Excel formula like 'A3+A5*5'.
getIEEE754()  : float|int
listWorksheetInfo2()  : array<string|int, mixed>
Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).
listWorksheetNames2()  : array<string|int, mixed>
Reads names of the worksheets from a file, without parsing the whole file to a PhpSpreadsheet object.
loadOLE()  : void
Use OLE reader to extract the relevant data streams from the OLE file.
loadSpreadsheetFromFile()  : Spreadsheet
Loads PhpSpreadsheet from file.
openFile()  : void
Open file for reading.
parseRichText()  : RichText
processFlags()  : void
readBlank()  : void
Read BLANK record.
readBof()  : void
Read BOF.
readBoolErr()  : void
Read BOOLERR record This record represents a Boolean value or error value cell.
readBottomMargin()  : void
Read BOTTOMMARGIN record.
readByteStringLong()  : array<string|int, mixed>
Read byte string (16-bit string length) OpenOffice documentation: 2.5.2.
readByteStringShort()  : array<string|int, mixed>
Read byte string (8-bit string length) OpenOffice documentation: 2.5.2.
readCFHeader()  : array<string|int, mixed>
Parse conditional formatting blocks.
readCFRule()  : void
readCodepage()  : void
CODEPAGE.
readColInfo()  : void
Read COLINFO record.
readContinue()  : void
Read a free CONTINUE record. Free CONTINUE record may be a camouflaged MSODRAWING record When MSODRAWING data on a sheet exceeds 8224 bytes, CONTINUE records are used instead. Undocumented.
readDataValidation()  : void
Read DATAVALIDATION record.
readDataValidations()  : void
Read DATAVALIDATIONS record.
readDateMode()  : void
DATEMODE.
readDefault()  : void
Reads a general type of BIFF record. Does nothing except for moving stream pointer forward to next record.
readDefaultRowHeight()  : void
Read DEFAULTROWHEIGHT record.
readDefColWidth()  : void
Read DEFCOLWIDTH record.
readDefinedName()  : void
DEFINEDNAME.
readDocumentSummaryInformation()  : void
Read additional document summary information.
readExternalBook()  : void
Read EXTERNALBOOK record.
readExternName()  : void
Read EXTERNNAME record.
readExternSheet()  : void
Read EXTERNSHEET record.
readFilepass()  : void
FILEPASS.
readFont()  : void
Read a FONT record.
readFooter()  : void
Read FOOTER record.
readFormat()  : void
FORMAT.
readFormula()  : void
Read FORMULA record + perhaps a following STRING record if formula result is a string This record contains the token array and the result of a formula cell.
readHcenter()  : void
Read HCENTER record.
readHeader()  : void
Read HEADER record.
readHorizontalPageBreaks()  : void
Read HORIZONTALPAGEBREAKS record.
readHyperLink()  : void
Read HYPERLINK record.
readLabel()  : void
Read LABEL record This record represents a cell that contains a string. In BIFF8 it is usually replaced by the LABELSST record.
readLabelSst()  : void
Read LABELSST record This record represents a cell that contains a string. It replaces the LABEL record and RSTRING record used in BIFF2-BIFF5.
readLeftMargin()  : void
Read LEFTMARGIN record.
readMergedCells()  : void
MERGEDCELLS.
readMsoDrawing()  : void
Read MSODRAWING record.
readMsoDrawingGroup()  : void
Read MSODRAWINGGROUP record.
readMulBlank()  : void
Read MULBLANK record This record represents a cell range of empty cells. All cells are located in the same row.
readMulRk()  : void
Read MULRK record This record represents a cell range containing RK value cells. All cells are located in the same row.
readNote()  : void
The NOTE record specifies a comment associated with a particular cell. In Excel 95 (BIFF7) and earlier versions, this record stores a note (cell note). This feature was significantly enhanced in Excel 97.
readNumber()  : void
Read NUMBER record This record represents a cell that contains a floating-point value.
readObj()  : void
Read OBJ record.
readObjectProtect()  : void
OBJECTPROTECT.
readPageLayoutView()  : void
Read PLV Record(Created by Excel2007 or upper).
readPageSetup()  : void
Read PAGESETUP record.
readPalette()  : void
Read PALETTE record.
readPane()  : void
Read PANE record.
readPassword()  : void
PASSWORD - Sheet protection (hashed) password (BIFF2 through BIFF8).
readPrintGridlines()  : void
Read PRINTGRIDLINES record.
readProtect()  : void
PROTECT - Sheet protection (BIFF2 through BIFF8) if this record is omitted, then it also means no sheet protection.
readRangeProtection()  : void
Read RANGEPROTECTION record Reading of this record is based on Microsoft Office Excel 97-2000 Binary File Format Specification, where it is referred to as FEAT record.
readRecordData()  : string
Read record data from stream, decrypting as required.
readRGB()  : array<string|int, mixed>
Extract RGB color OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.4.
readRightMargin()  : void
Read RIGHTMARGIN record.
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.
readRow()  : void
ROW.
readScenProtect()  : void
SCENPROTECT.
readScl()  : void
Read SCL record.
readSelection()  : string
Read SELECTION record. There is one such record for each pane in the sheet.
readSharedFmla()  : void
Read a SHAREDFMLA record. This function just stores the binary shared formula in the reader, which usually contains relative references.
readSheet()  : void
SHEET.
readSheetLayout()  : void
Read SHEETLAYOUT record. Stores sheet tab color information.
readSheetPr()  : void
Read SHEETPR record.
readSheetProtection()  : void
Read SHEETPROTECTION record (FEATHEADR).
readSheetRangeByRefIndex()  : string|false
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.
readSst()  : void
SST - Shared String Table.
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.
readStyle()  : void
Read STYLE record.
readSummaryInformation()  : void
Read summary information.
readTextObject()  : void
The TEXT Object record contains the text associated with a cell annotation.
readTopMargin()  : void
Read TOPMARGIN record.
readUnicodeString()  : array<string|int, mixed>
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.
readUnicodeStringLong()  : array<string|int, mixed>
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.
readUnicodeStringShort()  : array<string|int, mixed>
Extracts an Excel Unicode short string (8-bit string length) OpenOffice documentation: 2.5.3 function will automatically find out where the Unicode string ends.
readVcenter()  : void
Read VCENTER record.
readVerticalPageBreaks()  : void
Read VERTICALPAGEBREAKS record.
readWindow2()  : void
Read WINDOW2 record.
readXf()  : void
XF - Extended Format.
readXfExt()  : void
uncompressByteString()  : string
Convert UTF-16 string in compressed notation to uncompressed form. Only used for BIFF8.
UTF8toExcelDoubleQuoted()  : string
Convert UTF-8 string to string surounded by double quotes. Used for explicit string tokens in formulas.
createFormulaFromTokens()  : string
Take array of tokens together with additional data for formula and return human readable formula.
getFormulaFromData()  : string
Take formula data and additional data for formula and return human readable formula.
getNextToken()  : array<string|int, mixed>
Fetch next token from binary formula data.
getSplicedRecordData()  : array<string|int, mixed>
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.
includeCellRangeFiltered()  : bool
makeKey()  : RC4
Make an RC4 decryptor for the given block.
verifyPassword()  : bool
Verify RC4 file password.

Constants

BORDER_STYLE_MAP

public final mixed BORDER_STYLE_MAP = [ \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_NONE, // => 0x00, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN, // => 0x01, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUM, // => 0x02, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHED, // => 0x03, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DOTTED, // => 0x04, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK, // => 0x05, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DOUBLE, // => 0x06, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_HAIR, // => 0x07, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHED, // => 0x08, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHDOT, // => 0x09, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHDOT, // => 0x0A, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHDOTDOT, // => 0x0B, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHDOTDOT, // => 0x0C, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_SLANTDASHDOT, // => 0x0D, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_OMIT, // => 0x0E, \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_OMIT, ]

MS_BIFF_CRYPTO_NONE

public final mixed MS_BIFF_CRYPTO_NONE = 0

MS_BIFF_CRYPTO_RC4

public final mixed MS_BIFF_CRYPTO_RC4 = 2

MS_BIFF_CRYPTO_XOR

public final mixed MS_BIFF_CRYPTO_XOR = 1

REKEY_BLOCK

public final mixed REKEY_BLOCK = 0x400

XLS_BIFF7

public final mixed XLS_BIFF7 = 0x500

XLS_BIFF8

public final mixed XLS_BIFF8 = 0x600

XLS_TYPE_ARRAY

public final mixed XLS_TYPE_ARRAY = 0x221

XLS_TYPE_BLANK

public final mixed XLS_TYPE_BLANK = 0x201

XLS_TYPE_BOF

public final mixed XLS_TYPE_BOF = 0x809

XLS_TYPE_BOOLERR

public final mixed XLS_TYPE_BOOLERR = 0x205

XLS_TYPE_BOTTOMMARGIN

public final mixed XLS_TYPE_BOTTOMMARGIN = 0x29

XLS_TYPE_CFHEADER

public final mixed XLS_TYPE_CFHEADER = 0x1b0

XLS_TYPE_CFRULE

public final mixed XLS_TYPE_CFRULE = 0x1b1

XLS_TYPE_CODEPAGE

public final mixed XLS_TYPE_CODEPAGE = 0x42

XLS_TYPE_COLINFO

public final mixed XLS_TYPE_COLINFO = 0x7d

XLS_TYPE_CONTINUE

public final mixed XLS_TYPE_CONTINUE = 0x3c

XLS_TYPE_DATAVALIDATION

public final mixed XLS_TYPE_DATAVALIDATION = 0x1be

XLS_TYPE_DATAVALIDATIONS

public final mixed XLS_TYPE_DATAVALIDATIONS = 0x1b2

XLS_TYPE_DATEMODE

public final mixed XLS_TYPE_DATEMODE = 0x22

XLS_TYPE_DBCELL

public final mixed XLS_TYPE_DBCELL = 0xd7

XLS_TYPE_DEFAULTROWHEIGHT

public final mixed XLS_TYPE_DEFAULTROWHEIGHT = 0x225

XLS_TYPE_DEFCOLWIDTH

public final mixed XLS_TYPE_DEFCOLWIDTH = 0x55

XLS_TYPE_DEFINEDNAME

public final mixed XLS_TYPE_DEFINEDNAME = 0x18

XLS_TYPE_DIMENSION

public final mixed XLS_TYPE_DIMENSION = 0x200

XLS_TYPE_EOF

public final mixed XLS_TYPE_EOF = 0xa

XLS_TYPE_EXTERNALBOOK

public final mixed XLS_TYPE_EXTERNALBOOK = 0x1ae

XLS_TYPE_EXTERNNAME

public final mixed XLS_TYPE_EXTERNNAME = 0x23

XLS_TYPE_EXTERNSHEET

public final mixed XLS_TYPE_EXTERNSHEET = 0x17

XLS_TYPE_EXTSST

public final mixed XLS_TYPE_EXTSST = 0xff

XLS_TYPE_FILEPASS

public final mixed XLS_TYPE_FILEPASS = 0x2f

XLS_TYPE_FONT

public final mixed XLS_TYPE_FONT = 0x31
public final mixed XLS_TYPE_FOOTER = 0x15

XLS_TYPE_FORMAT

public final mixed XLS_TYPE_FORMAT = 0x41e

XLS_TYPE_FORMULA

public final mixed XLS_TYPE_FORMULA = 0x6

XLS_TYPE_HCENTER

public final mixed XLS_TYPE_HCENTER = 0x83

XLS_TYPE_HEADER

public final mixed XLS_TYPE_HEADER = 0x14

XLS_TYPE_HORIZONTALPAGEBREAKS

public final mixed XLS_TYPE_HORIZONTALPAGEBREAKS = 0x1b
public final mixed XLS_TYPE_HYPERLINK = 0x1b8

XLS_TYPE_IMDATA

public final mixed XLS_TYPE_IMDATA = 0x7f

XLS_TYPE_INDEX

public final mixed XLS_TYPE_INDEX = 0x20b

XLS_TYPE_LABEL

public final mixed XLS_TYPE_LABEL = 0x204

XLS_TYPE_LABELSST

public final mixed XLS_TYPE_LABELSST = 0xfd

XLS_TYPE_LEFTMARGIN

public final mixed XLS_TYPE_LEFTMARGIN = 0x26

XLS_TYPE_MERGEDCELLS

public final mixed XLS_TYPE_MERGEDCELLS = 0xe5

XLS_TYPE_MSODRAWING

public final mixed XLS_TYPE_MSODRAWING = 0xec

XLS_TYPE_MSODRAWINGGROUP

public final mixed XLS_TYPE_MSODRAWINGGROUP = 0xeb

XLS_TYPE_MULBLANK

public final mixed XLS_TYPE_MULBLANK = 0xbe

XLS_TYPE_MULRK

public final mixed XLS_TYPE_MULRK = 0xbd

XLS_TYPE_NOTE

public final mixed XLS_TYPE_NOTE = 0x1c

XLS_TYPE_NUMBER

public final mixed XLS_TYPE_NUMBER = 0x203

XLS_TYPE_OBJ

public final mixed XLS_TYPE_OBJ = 0x5d

XLS_TYPE_OBJECTPROTECT

public final mixed XLS_TYPE_OBJECTPROTECT = 0x63

XLS_TYPE_PAGELAYOUTVIEW

public final mixed XLS_TYPE_PAGELAYOUTVIEW = 0x88b

XLS_TYPE_PAGESETUP

public final mixed XLS_TYPE_PAGESETUP = 0xa1

XLS_TYPE_PALETTE

public final mixed XLS_TYPE_PALETTE = 0x92

XLS_TYPE_PANE

public final mixed XLS_TYPE_PANE = 0x41

XLS_TYPE_PASSWORD

public final mixed XLS_TYPE_PASSWORD = 0x13

XLS_TYPE_PRINTGRIDLINES

public final mixed XLS_TYPE_PRINTGRIDLINES = 0x2b

XLS_TYPE_PROTECT

public final mixed XLS_TYPE_PROTECT = 0x12

XLS_TYPE_RANGEPROTECTION

public final mixed XLS_TYPE_RANGEPROTECTION = 0x868

XLS_TYPE_RIGHTMARGIN

public final mixed XLS_TYPE_RIGHTMARGIN = 0x27

XLS_TYPE_RK

public final mixed XLS_TYPE_RK = 0x27e

XLS_TYPE_ROW

public final mixed XLS_TYPE_ROW = 0x208

XLS_TYPE_SCENPROTECT

public final mixed XLS_TYPE_SCENPROTECT = 0xdd

XLS_TYPE_SCL

public final mixed XLS_TYPE_SCL = 0xa0

XLS_TYPE_SELECTION

public final mixed XLS_TYPE_SELECTION = 0x1d

XLS_TYPE_SHAREDFMLA

public final mixed XLS_TYPE_SHAREDFMLA = 0x4bc

XLS_TYPE_SHEET

public final mixed XLS_TYPE_SHEET = 0x85

XLS_TYPE_SHEETLAYOUT

public final mixed XLS_TYPE_SHEETLAYOUT = 0x862

XLS_TYPE_SHEETPR

public final mixed XLS_TYPE_SHEETPR = 0x81

XLS_TYPE_SHEETPROTECTION

public final mixed XLS_TYPE_SHEETPROTECTION = 0x867

XLS_TYPE_SST

public final mixed XLS_TYPE_SST = 0xfc

XLS_TYPE_STRING

public final mixed XLS_TYPE_STRING = 0x207

XLS_TYPE_STYLE

public final mixed XLS_TYPE_STYLE = 0x293

XLS_TYPE_TOPMARGIN

public final mixed XLS_TYPE_TOPMARGIN = 0x28

XLS_TYPE_TXO

public final mixed XLS_TYPE_TXO = 0x1b6

XLS_TYPE_UNKNOWN

public final mixed XLS_TYPE_UNKNOWN = 0xffff

XLS_TYPE_VCENTER

public final mixed XLS_TYPE_VCENTER = 0x84

XLS_TYPE_VERTICALPAGEBREAKS

public final mixed XLS_TYPE_VERTICALPAGEBREAKS = 0x1a

XLS_TYPE_WINDOW2

public final mixed XLS_TYPE_WINDOW2 = 0x23e

XLS_TYPE_XF

public final mixed XLS_TYPE_XF = 0xe0

XLS_TYPE_XFEXT

public final mixed XLS_TYPE_XFEXT = 0x87d

XLS_WORKBOOKGLOBALS

public final mixed XLS_WORKBOOKGLOBALS = 0x5

XLS_WORKSHEET

public final mixed XLS_WORKSHEET = 0x10

FC000000

protected final mixed FC000000 = 0xfc << 24

FE000000

protected final mixed FE000000 = 0xfe << 24

HIGH_ORDER_BIT

protected final mixed HIGH_ORDER_BIT = 0x80 << 24

Properties

$activeSheetSet

protected bool $activeSheetSet = false

$baseCell

protected string $baseCell

$cellNotes

Cell Annotations (BIFF8).

protected array<string|int, mixed> $cellNotes

$codepage

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'.

protected string $codepage = ''

$data

Workbook stream data. (Includes workbook globals substream as well as sheet substreams).

protected string $data

$dataSize

Size in bytes of $this->data.

protected int $dataSize

$definedname

Defined names.

protected array<string|int, mixed> $definedname

$documentSummaryInformation

Extended Summary Information stream data.

protected string|null $documentSummaryInformation = null

$drawingData

The combined MSODRAWING data (per sheet).

protected string $drawingData

$drawingGroupData

The combined MSODRAWINGGROUP data.

protected string $drawingGroupData

$encryption

The type of encryption in use.

protected int $encryption = 0

$encryptionStartPos

The position in the stream after which contents are encrypted.

protected int $encryptionStartPos = 0

$externalBooks

External books.

protected array<string|int, mixed> $externalBooks

$externalNames

External names.

protected array<string|int, mixed> $externalNames

$formats

Shared formats.

protected array<string|int, mixed> $formats

$frozen

Panes are frozen? (in sheet currently being read). See WINDOW2 record.

protected bool $frozen

$ignoreRowsWithNoCells

Ignore rows with no cells? Identifies whether the Reader should ignore rows with no cells.

protected bool $ignoreRowsWithNoCells = false

Currently implemented only for Xlsx.

$includeCharts

Read charts that are defined in the workbook? Identifies whether the Reader should read the definitions for any charts that exist in the workbook;.

protected bool $includeCharts = false

$isFitToPages

Fit printout to number of pages? (in sheet currently being read). See SHEETPR record.

protected bool $isFitToPages

$loadSheetsOnly

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.

protected null|array<string|int, string> $loadSheetsOnly = null

This property is ignored for Csv, Html, and Slk.

$mapCellStyleXfIndex

Mapping of XF index (that is a style XF) to final index in cellStyleXf collection.

protected array<string|int, mixed> $mapCellStyleXfIndex

$mapCellXfIndex

Mapping of XF index (that is a cell XF) to final index in cellXf collection.

protected array<string|int, mixed> $mapCellXfIndex

$objFonts

Shared fonts.

protected array<string|int, Font> $objFonts

$objs

Objects. One OBJ record contributes with one entry.

protected array<string|int, mixed> $objs

$palette

Color palette.

protected array<string|int, mixed> $palette

$phpSheet

Worksheet that is currently being built by the reader.

protected Worksheet $phpSheet

$pos

Current position in stream.

protected int $pos

$rc4Key

The current RC4 decryption object.

protected RC4|null $rc4Key = null

$rc4Pos

The position in the stream that the RC4 decryption object was left at.

protected int $rc4Pos = 0

$readDataOnly

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.

protected bool $readDataOnly = false

$readEmptyCells

Read empty cells? Identifies whether the Reader should read data values for all cells, or should ignore cells containing null value or empty string.

protected bool $readEmptyCells = true

$ref

REF structures. Only applies to BIFF8.

protected array<string|int, mixed> $ref

$sharedFormulaParts

The shared formula parts in a sheet. One FORMULA record contributes with one value if it refers to a shared formula.

protected array<string|int, mixed> $sharedFormulaParts

$sharedFormulas

The shared formulas in a sheet. One SHAREDFMLA record contributes with one value.

protected array<string|int, mixed> $sharedFormulas

$sheets

Worksheets.

protected array<string|int, mixed> $sheets

$spreadsheet

Workbook to be returned by the reader.

protected Spreadsheet $spreadsheet

$sst

Shared strings. Only applies to BIFF8.

protected array<string|int, mixed> $sst

$summaryInformation

Summary Information stream data.

protected string|null $summaryInformation = null

$textObjects

Text Objects. One TXO record corresponds with one entry.

protected array<string|int, mixed> $textObjects

$textObjRef

protected int $textObjRef

$version

BIFF version.

protected int $version = 0

$xfIndex

Keep track of XF index.

protected int $xfIndex

$md5Ctxt

The current MD5 context state.

private string $md5Ctxt = ''

It is never set in the program, so code which uses it is suspect.

Methods

canRead()

Can the current IReader read the file?

public canRead(string $filename) : bool
Parameters
$filename : string
Return values
bool

getCodepage()

public getCodepage() : string
Return values
string

getIgnoreRowsWithNoCells()

public getIgnoreRowsWithNoCells() : bool
Return values
bool

getIncludeCharts()

Read charts in workbook? If this is true, then the Reader will include any charts that exist in the workbook.

public getIncludeCharts() : bool

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.

Return values
bool

getInt2d()

Read 16-bit signed integer.

public static getInt2d(string $data, int $pos) : int
Parameters
$data : string
$pos : int
Return values
int

getInt4d()

Read 32-bit signed integer.

public static getInt4d(string $data, int $pos) : int
Parameters
$data : string
$pos : int
Return values
int

getLoadSheetsOnly()

Get which sheets to load Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null indicating that all worksheets in the workbook should be loaded.

public getLoadSheetsOnly() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getMapCellStyleXfIndex()

Phpstan 1.4.4 complains that this property is never read.

public getMapCellStyleXfIndex() : array<string|int, mixed>

So, we might be able to get rid of it altogether. For now, however, this function makes it readable, which satisfies Phpstan.

Tags
codeCoverageIgnore
Return values
array<string|int, mixed>

getReadDataOnly()

Read data only? If this is true, then the Reader will only read data values for cells, it will not read any formatting or structural information (like merges).

public getReadDataOnly() : bool

If false (the default) it will read data and formatting.

Return values
bool

getReadEmptyCells()

Read empty cells? If this is true (the default), then the Reader will read data values for all cells, irrespective of value.

public getReadEmptyCells() : bool

If false it will not read data for cells containing a null value or an empty string.

Return values
bool

getUInt2d()

Read 16-bit unsigned integer.

public static getUInt2d(string $data, int $pos) : int
Parameters
$data : string
$pos : int
Return values
int

getVersion()

public getVersion() : int
Return values
int

listWorksheetInfo()

Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).

public listWorksheetInfo(string $filename) : array<string|int, mixed>
Parameters
$filename : string
Return values
array<string|int, mixed>

listWorksheetNames()

Reads names of the worksheets from a file, without parsing the whole file to a PhpSpreadsheet object.

public listWorksheetNames(string $filename) : array<string|int, mixed>
Parameters
$filename : string
Return values
array<string|int, mixed>

load()

Loads Spreadsheet from file.

public load(string $filename[, int $flags = 0 ]) : Spreadsheet
Parameters
$filename : string

The name of the file to load

$flags : int = 0

the optional second parameter flags may be used to identify specific elements that should be loaded, but which won't be loaded by default, using these values: IReader::LOAD_WITH_CHARTS - Include any charts that are defined in the loaded file

Return values
Spreadsheet

setCodepage()

public setCodepage(string $codepage) : void
Parameters
$codepage : string

setIgnoreRowsWithNoCells()

public setIgnoreRowsWithNoCells(bool $ignoreRowsWithNoCells) : self
Parameters
$ignoreRowsWithNoCells : bool
Return values
self

setIncludeCharts()

Set read charts in workbook Set to true, to advise the Reader to include any charts that exist in the workbook.

public setIncludeCharts(bool $includeCharts) : $this

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.

Parameters
$includeCharts : bool
Return values
$this

setLoadAllSheets()

Set all sheets to load Tells the Reader to load all worksheets from the workbook.

public setLoadAllSheets() : $this
Return values
$this

setLoadSheetsOnly()

Set which sheets to load.

public setLoadSheetsOnly(string|array<string|int, mixed>|null $sheetList) : $this
Parameters
$sheetList : string|array<string|int, mixed>|null
Return values
$this

setReadDataOnly()

Set read data only Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting or structural information (like merges).

public setReadDataOnly(bool $readCellValuesOnly) : $this

Set to false (the default) to advise the Reader to read both data and formatting for cells.

Parameters
$readCellValuesOnly : bool
Return values
$this

setReadEmptyCells()

Set read empty cells Set to true (the default) to advise the Reader read data values for all cells, irrespective of value.

public setReadEmptyCells(bool $readEmptyCells) : $this

Set to false to advise the Reader to ignore cells containing a null value or an empty string.

Parameters
$readEmptyCells : bool
Return values
$this

decodeCodepage()

Convert string to UTF-8. Only used for BIFF5.

protected decodeCodepage(string $string) : string
Parameters
$string : string
Return values
string

encodeUTF16()

Get UTF-8 string from (compressed or uncompressed) UTF-16 string.

protected static encodeUTF16(string $string[, bool $compressed = false ]) : string
Parameters
$string : string
$compressed : bool = false
Return values
string

extractNumber()

Reads first 8 bytes of a string and return IEEE 754 float.

protected static extractNumber(string $data) : int|float
Parameters
$data : string

Binary string that is at least 8 bytes long

Return values
int|float

getFormulaFromStructure()

Convert formula structure into human readable Excel formula like 'A3+A5*5'.

protected getFormulaFromStructure(string $formulaStructure[, string $baseCell = 'A1' ]) : string
Parameters
$formulaStructure : string

The complete binary data for the formula

$baseCell : string = 'A1'

Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas

Return values
string

Human readable formula

getIEEE754()

protected static getIEEE754(int $rknum) : float|int
Parameters
$rknum : int
Return values
float|int

listWorksheetInfo2()

Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).

protected listWorksheetInfo2(string $filename, Xls $xls) : array<string|int, mixed>
Parameters
$filename : string
$xls : Xls
Return values
array<string|int, mixed>

listWorksheetNames2()

Reads names of the worksheets from a file, without parsing the whole file to a PhpSpreadsheet object.

protected listWorksheetNames2(string $filename, Xls $xls) : array<string|int, mixed>
Parameters
$filename : string
$xls : Xls
Return values
array<string|int, mixed>

loadOLE()

Use OLE reader to extract the relevant data streams from the OLE file.

protected loadOLE(string $filename) : void
Parameters
$filename : string

loadSpreadsheetFromFile()

Loads PhpSpreadsheet from file.

protected loadSpreadsheetFromFile(string $filename) : Spreadsheet
Parameters
$filename : string
Return values
Spreadsheet

openFile()

Open file for reading.

protected openFile(string $filename) : void
Parameters
$filename : string

parseRichText()

protected parseRichText(string $is) : RichText
Parameters
$is : string
Return values
RichText

processFlags()

protected processFlags(int $flags) : void
Parameters
$flags : int

readBlank()

Read BLANK record.

protected readBlank() : void

readBof()

Read BOF.

protected readBof() : void

readBoolErr()

Read BOOLERR record This record represents a Boolean value or error value cell.

protected readBoolErr() : void

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readBottomMargin()

Read BOTTOMMARGIN record.

protected readBottomMargin() : void

readByteStringLong()

Read byte string (16-bit string length) OpenOffice documentation: 2.5.2.

protected readByteStringLong(string $subData) : array<string|int, mixed>
Parameters
$subData : string
Return values
array<string|int, mixed>

readByteStringShort()

Read byte string (8-bit string length) OpenOffice documentation: 2.5.2.

protected readByteStringShort(string $subData) : array<string|int, mixed>
Parameters
$subData : string
Return values
array<string|int, mixed>

readCFRule()

protected readCFRule(array<string|int, mixed> $cellRangeAddresses) : void
Parameters
$cellRangeAddresses : array<string|int, mixed>

readCodepage()

CODEPAGE.

protected readCodepage() : void

This record stores the text encoding used to write byte strings, stored as MS Windows code page identifier.

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readColInfo()

Read COLINFO record.

protected readColInfo() : void

readContinue()

Read a free CONTINUE record. Free CONTINUE record may be a camouflaged MSODRAWING record When MSODRAWING data on a sheet exceeds 8224 bytes, CONTINUE records are used instead. Undocumented.

protected readContinue() : void

In this case, we must treat the CONTINUE record as a MSODRAWING record.

readDataValidation()

Read DATAVALIDATION record.

protected readDataValidation() : void

readDataValidations()

Read DATAVALIDATIONS record.

protected readDataValidations() : void

readDateMode()

DATEMODE.

protected readDateMode() : void

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"

readDefault()

Reads a general type of BIFF record. Does nothing except for moving stream pointer forward to next record.

protected readDefault() : void

readDefaultRowHeight()

Read DEFAULTROWHEIGHT record.

protected readDefaultRowHeight() : void

readDefColWidth()

Read DEFCOLWIDTH record.

protected readDefColWidth() : void

readDefinedName()

DEFINEDNAME.

protected readDefinedName() : void

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"

readDocumentSummaryInformation()

Read additional document summary information.

protected readDocumentSummaryInformation() : void

readExternalBook()

Read EXTERNALBOOK record.

protected readExternalBook() : void

readExternName()

Read EXTERNNAME record.

protected readExternName() : void

readExternSheet()

Read EXTERNSHEET record.

protected readExternSheet() : void

readFilepass()

FILEPASS.

protected readFilepass() : void

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

readFont()

Read a FONT record.

protected readFont() : void

readFooter()

Read FOOTER record.

protected readFooter() : void

readFormat()

FORMAT.

protected readFormat() : void

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"

readFormula()

Read FORMULA record + perhaps a following STRING record if formula result is a string This record contains the token array and the result of a formula cell.

protected readFormula() : void

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readHcenter()

Read HCENTER record.

protected readHcenter() : void

readHeader()

Read HEADER record.

protected readHeader() : void

readHorizontalPageBreaks()

Read HORIZONTALPAGEBREAKS record.

protected readHorizontalPageBreaks() : void

Read HYPERLINK record.

protected readHyperLink() : void

readLabel()

Read LABEL record This record represents a cell that contains a string. In BIFF8 it is usually replaced by the LABELSST record.

protected readLabel() : void

Excel still uses this record, if it copies unformatted text cells to the clipboard.

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readLabelSst()

Read LABELSST record This record represents a cell that contains a string. It replaces the LABEL record and RSTRING record used in BIFF2-BIFF5.

protected readLabelSst() : void

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readLeftMargin()

Read LEFTMARGIN record.

protected readLeftMargin() : void

readMergedCells()

MERGEDCELLS.

protected readMergedCells() : void

This record contains the addresses of merged cell ranges in the current sheet.

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readMsoDrawing()

Read MSODRAWING record.

protected readMsoDrawing() : void

readMsoDrawingGroup()

Read MSODRAWINGGROUP record.

protected readMsoDrawingGroup() : void

readMulBlank()

Read MULBLANK record This record represents a cell range of empty cells. All cells are located in the same row.

protected readMulBlank() : void

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readMulRk()

Read MULRK record This record represents a cell range containing RK value cells. All cells are located in the same row.

protected readMulRk() : void

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readNote()

The NOTE record specifies a comment associated with a particular cell. In Excel 95 (BIFF7) and earlier versions, this record stores a note (cell note). This feature was significantly enhanced in Excel 97.

protected readNote() : void

readNumber()

Read NUMBER record This record represents a cell that contains a floating-point value.

protected readNumber() : void

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readObj()

Read OBJ record.

protected readObj() : void

readObjectProtect()

OBJECTPROTECT.

protected readObjectProtect() : void

readPageLayoutView()

Read PLV Record(Created by Excel2007 or upper).

protected readPageLayoutView() : void

readPageSetup()

Read PAGESETUP record.

protected readPageSetup() : void

readPalette()

Read PALETTE record.

protected readPalette() : void

readPane()

Read PANE record.

protected readPane() : void

readPassword()

PASSWORD - Sheet protection (hashed) password (BIFF2 through BIFF8).

protected readPassword() : void

readPrintGridlines()

Read PRINTGRIDLINES record.

protected readPrintGridlines() : void

readProtect()

PROTECT - Sheet protection (BIFF2 through BIFF8) if this record is omitted, then it also means no sheet protection.

protected readProtect() : void

readRangeProtection()

Read RANGEPROTECTION record Reading of this record is based on Microsoft Office Excel 97-2000 Binary File Format Specification, where it is referred to as FEAT record.

protected readRangeProtection() : void

readRecordData()

Read record data from stream, decrypting as required.

protected readRecordData(string $data, int $pos, int $len) : string
Parameters
$data : string

Data stream to read from

$pos : int

Position to start reading from

$len : int

Record data length

Return values
string

Record data

readRGB()

Extract RGB color OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.4.

protected static readRGB(string $rgb) : array<string|int, mixed>
Parameters
$rgb : string

Encoded RGB value (4 bytes)

Return values
array<string|int, mixed>

readRightMargin()

Read RIGHTMARGIN record.

protected readRightMargin() : void

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.

protected readRk() : void

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readRow()

ROW.

protected readRow() : void

This record contains the properties of a single row in a sheet. Rows and cells in a sheet are divided into blocks of 32 rows.

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readScenProtect()

SCENPROTECT.

protected readScenProtect() : void

readScl()

Read SCL record.

protected readScl() : void

readSelection()

Read SELECTION record. There is one such record for each pane in the sheet.

protected readSelection() : string
Return values
string

readSharedFmla()

Read a SHAREDFMLA record. This function just stores the binary shared formula in the reader, which usually contains relative references.

protected readSharedFmla() : void

These will be used to construct the formula in each shared formula part after the sheet is read.

readSheet()

SHEET.

protected readSheet() : void

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"

readSheetLayout()

Read SHEETLAYOUT record. Stores sheet tab color information.

protected readSheetLayout() : void

readSheetPr()

Read SHEETPR record.

protected readSheetPr() : void

readSheetProtection()

Read SHEETPROTECTION record (FEATHEADR).

protected readSheetProtection() : void

readSheetRangeByRefIndex()

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.

protected readSheetRangeByRefIndex(int $index) : string|false
Parameters
$index : int
Return values
string|false

readSst()

SST - Shared String Table.

protected readSst() : void

This record contains a list of all strings used anywhere in the workbook. Each string occurs only once. The workbook uses indexes into the list to reference the strings.

-- "OpenOffice.org's Documentation of the Microsoft Excel File Format"

readString()

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.

protected readString() : string
Return values
string

The string contents as UTF-8

readStyle()

Read STYLE record.

protected readStyle() : void

readSummaryInformation()

Read summary information.

protected readSummaryInformation() : void

readTextObject()

The TEXT Object record contains the text associated with a cell annotation.

protected readTextObject() : void

readTopMargin()

Read TOPMARGIN record.

protected readTopMargin() : void

readUnicodeString()

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.

protected static readUnicodeString(string $subData, int $characterCount) : array<string|int, mixed>
Parameters
$subData : string
$characterCount : int
Return values
array<string|int, mixed>

readUnicodeStringLong()

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.

protected static readUnicodeStringLong(string $subData) : array<string|int, mixed>
Parameters
$subData : string
Return values
array<string|int, mixed>

readUnicodeStringShort()

Extracts an Excel Unicode short string (8-bit string length) OpenOffice documentation: 2.5.3 function will automatically find out where the Unicode string ends.

protected static readUnicodeStringShort(string $subData) : array<string|int, mixed>
Parameters
$subData : string
Return values
array<string|int, mixed>

readVcenter()

Read VCENTER record.

protected readVcenter() : void

readVerticalPageBreaks()

Read VERTICALPAGEBREAKS record.

protected readVerticalPageBreaks() : void

readWindow2()

Read WINDOW2 record.

protected readWindow2() : void

readXf()

XF - Extended Format.

protected readXf() : void

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"

readXfExt()

protected readXfExt() : void

uncompressByteString()

Convert UTF-16 string in compressed notation to uncompressed form. Only used for BIFF8.

protected static uncompressByteString(string $string) : string
Parameters
$string : string
Return values
string

UTF8toExcelDoubleQuoted()

Convert UTF-8 string to string surounded by double quotes. Used for explicit string tokens in formulas.

protected static UTF8toExcelDoubleQuoted(string $value) : string

Example: hello"world --> "hello""world".

Parameters
$value : string

UTF-8 encoded string

Return values
string

createFormulaFromTokens()

Take array of tokens together with additional data for formula and return human readable formula.

private createFormulaFromTokens(array<string|int, mixed> $tokens, string $additionalData) : string
Parameters
$tokens : array<string|int, mixed>
$additionalData : string

Additional binary data going with the formula

Return values
string

Human readable formula

getFormulaFromData()

Take formula data and additional data for formula and return human readable formula.

private getFormulaFromData(string $formulaData[, string $additionalData = '' ][, string $baseCell = 'A1' ]) : string
Parameters
$formulaData : string

The binary data for the formula itself

$additionalData : string = ''

Additional binary data going with the formula

$baseCell : string = 'A1'

Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas

Return values
string

Human readable formula

getNextToken()

Fetch next token from binary formula data.

private getNextToken(string $formulaData[, string $baseCell = 'A1' ]) : array<string|int, mixed>
Parameters
$formulaData : string

Formula data

$baseCell : string = 'A1'

Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas

Return values
array<string|int, mixed>

getSplicedRecordData()

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.

private getSplicedRecordData() : array<string|int, mixed>

Moves to next current position in data stream to start of next record different from a CONtINUE record.

Return values
array<string|int, mixed>

includeCellRangeFiltered()

private includeCellRangeFiltered(string $cellRangeAddress) : bool
Parameters
$cellRangeAddress : string
Return values
bool

makeKey()

Make an RC4 decryptor for the given block.

private makeKey(int $block, string $valContext) : RC4
Parameters
$block : int

Block for which to create decrypto

$valContext : string

MD5 context state

Return values
RC4

verifyPassword()

Verify RC4 file password.

private verifyPassword(string $password, string $docid, string $salt_data, string $hashedsalt_data, string &$valContext) : bool
Parameters
$password : string

Password to check

$docid : string

Document id

$salt_data : string

Salt data

$hashedsalt_data : string

Hashed salt data

$valContext : string

Set to the MD5 context of the value

Return values
bool

Success


        
On this page

Search results