\PHPExcel_Reader_Excel5

PHPExcel_Reader_Abstract

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

Summary

Methods
Properties
Constants
getReadDataOnly()
setReadDataOnly()
getReadEmptyCells()
setReadEmptyCells()
getIncludeCharts()
setIncludeCharts()
getLoadSheetsOnly()
setLoadSheetsOnly()
setLoadAllSheets()
getReadFilter()
setReadFilter()
canRead()
securityScan()
securityScanFile()
__construct()
listWorksheetNames()
listWorksheetInfo()
load()
getInt2d()
getInt4d()
No public properties found
XLS_BIFF8
XLS_BIFF7
XLS_WorkbookGlobals
XLS_Worksheet
XLS_TYPE_FORMULA
XLS_TYPE_EOF
XLS_TYPE_PROTECT
XLS_TYPE_OBJECTPROTECT
XLS_TYPE_SCENPROTECT
XLS_TYPE_PASSWORD
XLS_TYPE_HEADER
XLS_TYPE_FOOTER
XLS_TYPE_EXTERNSHEET
XLS_TYPE_DEFINEDNAME
XLS_TYPE_VERTICALPAGEBREAKS
XLS_TYPE_HORIZONTALPAGEBREAKS
XLS_TYPE_NOTE
XLS_TYPE_SELECTION
XLS_TYPE_DATEMODE
XLS_TYPE_EXTERNNAME
XLS_TYPE_LEFTMARGIN
XLS_TYPE_RIGHTMARGIN
XLS_TYPE_TOPMARGIN
XLS_TYPE_BOTTOMMARGIN
XLS_TYPE_PRINTGRIDLINES
XLS_TYPE_FILEPASS
XLS_TYPE_FONT
XLS_TYPE_CONTINUE
XLS_TYPE_PANE
XLS_TYPE_CODEPAGE
XLS_TYPE_DEFCOLWIDTH
XLS_TYPE_OBJ
XLS_TYPE_COLINFO
XLS_TYPE_IMDATA
XLS_TYPE_SHEETPR
XLS_TYPE_HCENTER
XLS_TYPE_VCENTER
XLS_TYPE_SHEET
XLS_TYPE_PALETTE
XLS_TYPE_SCL
XLS_TYPE_PAGESETUP
XLS_TYPE_MULRK
XLS_TYPE_MULBLANK
XLS_TYPE_DBCELL
XLS_TYPE_XF
XLS_TYPE_MERGEDCELLS
XLS_TYPE_MSODRAWINGGROUP
XLS_TYPE_MSODRAWING
XLS_TYPE_SST
XLS_TYPE_LABELSST
XLS_TYPE_EXTSST
XLS_TYPE_EXTERNALBOOK
XLS_TYPE_DATAVALIDATIONS
XLS_TYPE_TXO
XLS_TYPE_HYPERLINK
XLS_TYPE_DATAVALIDATION
XLS_TYPE_DIMENSION
XLS_TYPE_BLANK
XLS_TYPE_NUMBER
XLS_TYPE_LABEL
XLS_TYPE_BOOLERR
XLS_TYPE_STRING
XLS_TYPE_ROW
XLS_TYPE_INDEX
XLS_TYPE_ARRAY
XLS_TYPE_DEFAULTROWHEIGHT
XLS_TYPE_WINDOW2
XLS_TYPE_RK
XLS_TYPE_STYLE
XLS_TYPE_FORMAT
XLS_TYPE_SHAREDFMLA
XLS_TYPE_BOF
XLS_TYPE_SHEETPROTECTION
XLS_TYPE_RANGEPROTECTION
XLS_TYPE_SHEETLAYOUT
XLS_TYPE_XFEXT
XLS_TYPE_PAGELAYOUTVIEW
XLS_TYPE_UNKNOWN
MS_BIFF_CRYPTO_NONE
MS_BIFF_CRYPTO_XOR
MS_BIFF_CRYPTO_RC4
REKEY_BLOCK
openFile()
$readDataOnly
$readEmptyCells
$includeCharts
$loadSheetsOnly
$readFilter
$fileHandle
N/A
readRecordData()
loadOLE()
readSummaryInformation()
readDocumentSummaryInformation()
readDefault()
readNote()
readTextObject()
readBof()
readFilepass()
makeKey()
verifyPassword()
readCodepage()
readDateMode()
readFont()
readFormat()
readXf()
readXfExt()
readStyle()
readPalette()
readSheet()
readExternalBook()
readExternName()
readExternSheet()
readDefinedName()
readMsoDrawingGroup()
readSst()
readPrintGridlines()
readDefaultRowHeight()
readSheetPr()
readHorizontalPageBreaks()
readVerticalPageBreaks()
readHeader()
readFooter()
readHcenter()
readVcenter()
readLeftMargin()
readRightMargin()
readTopMargin()
readBottomMargin()
readPageSetup()
readProtect()
readScenProtect()
readObjectProtect()
readPassword()
readDefColWidth()
readColInfo()
readRow()
readRk()
readLabelSst()
readMulRk()
readNumber()
readFormula()
readSharedFmla()
readString()
readBoolErr()
readMulBlank()
readLabel()
readBlank()
readMsoDrawing()
readObj()
readWindow2()
readPageLayoutView()
readScl()
readPane()
readSelection()
includeCellRangeFiltered()
readMergedCells()
readHyperLink()
readDataValidations()
readDataValidation()
readSheetLayout()
readSheetProtection()
readRangeProtection()
readImData()
readContinue()
getSplicedRecordData()
getFormulaFromStructure()
getFormulaFromData()
createFormulaFromTokens()
getNextToken()
readBIFF8CellAddress()
readBIFF8CellAddressB()
readBIFF5CellRangeAddressFixed()
readBIFF8CellRangeAddressFixed()
readBIFF8CellRangeAddress()
readBIFF8CellRangeAddressB()
readBIFF8CellRangeAddressList()
readBIFF5CellRangeAddressList()
readSheetRangeByRefIndex()
readBIFF8ConstantArray()
readBIFF8Constant()
readRGB()
readByteStringShort()
readByteStringLong()
readUnicodeStringShort()
readUnicodeStringLong()
readUnicodeString()
UTF8toExcelDoubleQuoted()
extractNumber()
getIEEE754()
encodeUTF16()
uncompressByteString()
decodeCodepage()
parseRichText()
$summaryInformation
$documentSummaryInformation
$userDefinedProperties
$data
$dataSize
$pos
$phpExcel
$phpSheet
$version
$codepage
$formats
$objFonts
$palette
$sheets
$externalBooks
$ref
$externalNames
$definedname
$sst
$frozen
$isFitToPages
$objs
$textObjects
$cellNotes
$drawingGroupData
$drawingData
$xfIndex
$mapCellXfIndex
$mapCellStyleXfIndex
$sharedFormulas
$sharedFormulaParts
$encryption
$encryptionStartPos
$rc4Key
$rc4Pos
$md5Ctxt
N/A

Constants

XLS_BIFF8

XLS_BIFF8 = 1536

XLS_BIFF7

XLS_BIFF7 = 1280

XLS_WorkbookGlobals

XLS_WorkbookGlobals = 5

XLS_Worksheet

XLS_Worksheet = 16

XLS_TYPE_FORMULA

XLS_TYPE_FORMULA = 6

XLS_TYPE_EOF

XLS_TYPE_EOF = 10

XLS_TYPE_PROTECT

XLS_TYPE_PROTECT = 18

XLS_TYPE_OBJECTPROTECT

XLS_TYPE_OBJECTPROTECT = 99

XLS_TYPE_SCENPROTECT

XLS_TYPE_SCENPROTECT = 221

XLS_TYPE_PASSWORD

XLS_TYPE_PASSWORD = 19

XLS_TYPE_HEADER

XLS_TYPE_HEADER = 20

XLS_TYPE_EXTERNSHEET

XLS_TYPE_EXTERNSHEET = 23

XLS_TYPE_DEFINEDNAME

XLS_TYPE_DEFINEDNAME = 24

XLS_TYPE_VERTICALPAGEBREAKS

XLS_TYPE_VERTICALPAGEBREAKS = 26

XLS_TYPE_HORIZONTALPAGEBREAKS

XLS_TYPE_HORIZONTALPAGEBREAKS = 27

XLS_TYPE_NOTE

XLS_TYPE_NOTE = 28

XLS_TYPE_SELECTION

XLS_TYPE_SELECTION = 29

XLS_TYPE_DATEMODE

XLS_TYPE_DATEMODE = 34

XLS_TYPE_EXTERNNAME

XLS_TYPE_EXTERNNAME = 35

XLS_TYPE_LEFTMARGIN

XLS_TYPE_LEFTMARGIN = 38

XLS_TYPE_RIGHTMARGIN

XLS_TYPE_RIGHTMARGIN = 39

XLS_TYPE_TOPMARGIN

XLS_TYPE_TOPMARGIN = 40

XLS_TYPE_BOTTOMMARGIN

XLS_TYPE_BOTTOMMARGIN = 41

XLS_TYPE_PRINTGRIDLINES

XLS_TYPE_PRINTGRIDLINES = 43

XLS_TYPE_FILEPASS

XLS_TYPE_FILEPASS = 47

XLS_TYPE_FONT

XLS_TYPE_FONT = 49

XLS_TYPE_CONTINUE

XLS_TYPE_CONTINUE = 60

XLS_TYPE_PANE

XLS_TYPE_PANE = 65

XLS_TYPE_CODEPAGE

XLS_TYPE_CODEPAGE = 66

XLS_TYPE_DEFCOLWIDTH

XLS_TYPE_DEFCOLWIDTH = 85

XLS_TYPE_OBJ

XLS_TYPE_OBJ = 93

XLS_TYPE_COLINFO

XLS_TYPE_COLINFO = 125

XLS_TYPE_IMDATA

XLS_TYPE_IMDATA = 127

XLS_TYPE_SHEETPR

XLS_TYPE_SHEETPR = 129

XLS_TYPE_HCENTER

XLS_TYPE_HCENTER = 131

XLS_TYPE_VCENTER

XLS_TYPE_VCENTER = 132

XLS_TYPE_SHEET

XLS_TYPE_SHEET = 133

XLS_TYPE_PALETTE

XLS_TYPE_PALETTE = 146

XLS_TYPE_SCL

XLS_TYPE_SCL = 160

XLS_TYPE_PAGESETUP

XLS_TYPE_PAGESETUP = 161

XLS_TYPE_MULRK

XLS_TYPE_MULRK = 189

XLS_TYPE_MULBLANK

XLS_TYPE_MULBLANK = 190

XLS_TYPE_DBCELL

XLS_TYPE_DBCELL = 215

XLS_TYPE_XF

XLS_TYPE_XF = 224

XLS_TYPE_MERGEDCELLS

XLS_TYPE_MERGEDCELLS = 229

XLS_TYPE_MSODRAWINGGROUP

XLS_TYPE_MSODRAWINGGROUP = 235

XLS_TYPE_MSODRAWING

XLS_TYPE_MSODRAWING = 236

XLS_TYPE_SST

XLS_TYPE_SST = 252

XLS_TYPE_LABELSST

XLS_TYPE_LABELSST = 253

XLS_TYPE_EXTSST

XLS_TYPE_EXTSST = 255

XLS_TYPE_EXTERNALBOOK

XLS_TYPE_EXTERNALBOOK = 430

XLS_TYPE_DATAVALIDATIONS

XLS_TYPE_DATAVALIDATIONS = 434

XLS_TYPE_TXO

XLS_TYPE_TXO = 438

XLS_TYPE_DATAVALIDATION

XLS_TYPE_DATAVALIDATION = 446

XLS_TYPE_DIMENSION

XLS_TYPE_DIMENSION = 512

XLS_TYPE_BLANK

XLS_TYPE_BLANK = 513

XLS_TYPE_NUMBER

XLS_TYPE_NUMBER = 515

XLS_TYPE_LABEL

XLS_TYPE_LABEL = 516

XLS_TYPE_BOOLERR

XLS_TYPE_BOOLERR = 517

XLS_TYPE_STRING

XLS_TYPE_STRING = 519

XLS_TYPE_ROW

XLS_TYPE_ROW = 520

XLS_TYPE_INDEX

XLS_TYPE_INDEX = 523

XLS_TYPE_ARRAY

XLS_TYPE_ARRAY = 545

XLS_TYPE_DEFAULTROWHEIGHT

XLS_TYPE_DEFAULTROWHEIGHT = 549

XLS_TYPE_WINDOW2

XLS_TYPE_WINDOW2 = 574

XLS_TYPE_RK

XLS_TYPE_RK = 638

XLS_TYPE_STYLE

XLS_TYPE_STYLE = 659

XLS_TYPE_FORMAT

XLS_TYPE_FORMAT = 1054

XLS_TYPE_SHAREDFMLA

XLS_TYPE_SHAREDFMLA = 1212

XLS_TYPE_BOF

XLS_TYPE_BOF = 2057

XLS_TYPE_SHEETPROTECTION

XLS_TYPE_SHEETPROTECTION = 2151

XLS_TYPE_RANGEPROTECTION

XLS_TYPE_RANGEPROTECTION = 2152

XLS_TYPE_SHEETLAYOUT

XLS_TYPE_SHEETLAYOUT = 2146

XLS_TYPE_XFEXT

XLS_TYPE_XFEXT = 2173

XLS_TYPE_PAGELAYOUTVIEW

XLS_TYPE_PAGELAYOUTVIEW = 2187

XLS_TYPE_UNKNOWN

XLS_TYPE_UNKNOWN = 65535

MS_BIFF_CRYPTO_NONE

MS_BIFF_CRYPTO_NONE = 0

MS_BIFF_CRYPTO_XOR

MS_BIFF_CRYPTO_XOR = 1

MS_BIFF_CRYPTO_RC4

MS_BIFF_CRYPTO_RC4 = 2

REKEY_BLOCK

REKEY_BLOCK = 1024

Properties

$readDataOnly

$readDataOnly : boolean

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

Type

boolean

$readEmptyCells

$readEmptyCells : boolean

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

Type

boolean

$includeCharts

$includeCharts : boolean

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

Type

boolean

$loadSheetsOnly

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

Type

array — of string

$fileHandle

$fileHandle : 

Type

$summaryInformation

$summaryInformation : string

Summary Information stream data.

Type

string

$documentSummaryInformation

$documentSummaryInformation : string

Extended Summary Information stream data.

Type

string

$userDefinedProperties

$userDefinedProperties : string

User-Defined Properties stream data.

Type

string

$data

$data : string

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

Type

string

$dataSize

$dataSize : integer

Size in bytes of $this->data

Type

integer

$pos

$pos : integer

Current position in stream

Type

integer

$phpExcel

$phpExcel : \PHPExcel

Workbook to be returned by the reader.

Type

\PHPExcel

$phpSheet

$phpSheet : \PHPExcel_Worksheet

Worksheet that is currently being built by the reader.

Type

\PHPExcel_Worksheet

$version

$version : integer

BIFF version

Type

integer

$codepage

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

Type

string

$formats

$formats : array

Shared formats

Type

array

$objFonts

$objFonts : array

Shared fonts

Type

array

$palette

$palette : array

Color palette

Type

array

$sheets

$sheets : array

Worksheets

Type

array

$externalBooks

$externalBooks : array

External books

Type

array

$ref

$ref : array

REF structures. Only applies to BIFF8.

Type

array

$externalNames

$externalNames : array

External names

Type

array

$definedname

$definedname : array

Defined names

Type

array

$sst

$sst : array

Shared strings. Only applies to BIFF8.

Type

array

$frozen

$frozen : boolean

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

Type

boolean

$isFitToPages

$isFitToPages : boolean

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

Type

boolean

$objs

$objs : array

Objects. One OBJ record contributes with one entry.

Type

array

$textObjects

$textObjects : array

Text Objects. One TXO record corresponds with one entry.

Type

array

$cellNotes

$cellNotes : array

Cell Annotations (BIFF8)

Type

array

$drawingGroupData

$drawingGroupData : string

The combined MSODRAWINGGROUP data

Type

string

$drawingData

$drawingData : string

The combined MSODRAWING data (per sheet)

Type

string

$xfIndex

$xfIndex : integer

Keep track of XF index

Type

integer

$mapCellXfIndex

$mapCellXfIndex : array

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

Type

array

$mapCellStyleXfIndex

$mapCellStyleXfIndex : array

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

Type

array

$sharedFormulas

$sharedFormulas : array

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

Type

array

$sharedFormulaParts

$sharedFormulaParts : array

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

Type

array

$encryption

$encryption : integer

The type of encryption in use

Type

integer

$encryptionStartPos

$encryptionStartPos : integer

The position in the stream after which contents are encrypted

Type

integer

$rc4Pos

$rc4Pos : integer

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

Type

integer

$md5Ctxt

$md5Ctxt : string

The current MD5 context state

Type

string

Methods

getReadDataOnly()

getReadDataOnly() : boolean

Read data only? If this is true, then the Reader will only read data values for cells, it will not read any formatting information.

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

Returns

boolean

setReadDataOnly()

setReadDataOnly(boolean  $pValue = false) : \PHPExcel_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.

Parameters

boolean $pValue

Returns

\PHPExcel_Reader_IReader

getReadEmptyCells()

getReadEmptyCells() : boolean

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

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

Returns

boolean

setReadEmptyCells()

setReadEmptyCells(boolean  $pValue = true) : \PHPExcel_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.

Parameters

boolean $pValue

Returns

\PHPExcel_Reader_IReader

getIncludeCharts()

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.

Returns

boolean

setIncludeCharts()

setIncludeCharts(boolean  $pValue = false) : \PHPExcel_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.

Parameters

boolean $pValue

Returns

\PHPExcel_Reader_IReader

getLoadSheetsOnly()

getLoadSheetsOnly() : mixed

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.

Returns

mixed

setLoadSheetsOnly()

setLoadSheetsOnly(mixed  $value = null) : \PHPExcel_Reader_IReader

Set which sheets to load

Parameters

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

Returns

\PHPExcel_Reader_IReader

setLoadAllSheets()

setLoadAllSheets() : \PHPExcel_Reader_IReader

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

Returns

\PHPExcel_Reader_IReader

canRead()

canRead(string  $pFilename) : boolean

Can the current PHPExcel_Reader_IReader read the file?

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

boolean

securityScan()

securityScan(string  $xml) 

Scan theXML for use of <!ENTITY to prevent XXE/XEE attacks

Parameters

string $xml

Throws

\PHPExcel_Reader_Exception

securityScanFile()

securityScanFile(string  $filestream) 

Scan theXML for use of <!ENTITY to prevent XXE/XEE attacks

Parameters

string $filestream

Throws

\PHPExcel_Reader_Exception

__construct()

__construct() 

Create a new PHPExcel_Reader_Excel5 instance

listWorksheetNames()

listWorksheetNames(string  $pFilename) 

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

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

listWorksheetInfo()

listWorksheetInfo(string  $pFilename) 

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

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

load()

load(string  $pFilename) : \PHPExcel

Loads PHPExcel from file

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

\PHPExcel

getInt2d()

getInt2d(string  $data, integer  $pos) : integer

Read 16-bit unsigned integer

Parameters

string $data
integer $pos

Returns

integer

getInt4d()

getInt4d(string  $data, integer  $pos) : integer

Read 32-bit signed integer

Parameters

string $data
integer $pos

Returns

integer

openFile()

openFile(string  $pFilename) : resource

Open file for reading

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

resource

readRecordData()

readRecordData(string  $data, integer  $pos,   $len) : string

Read record data from stream, decrypting as required

Parameters

string $data

Data stream to read from

integer $pos

Position to start reading from

$len

Returns

string —

Record data

loadOLE()

loadOLE(string  $pFilename) 

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

Parameters

string $pFilename

readSummaryInformation()

readSummaryInformation() 

Read summary information

readDocumentSummaryInformation()

readDocumentSummaryInformation() 

Read additional document summary information

readDefault()

readDefault() 

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

readNote()

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.

readTextObject()

readTextObject() 

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

readBof()

readBof() 

Read BOF

readFilepass()

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()

makeKey(  $block,   $valContext) : \PHPExcel_Reader_Excel5_RC4

Make an RC4 decryptor for the given block

Parameters

$block
$valContext

Returns

\PHPExcel_Reader_Excel5_RC4

verifyPassword()

verifyPassword(  $password,   $docid,   $salt_data,   $hashedsalt_data,   $valContext) : boolean

Verify RC4 file password

Parameters

$password
$docid
$salt_data
$hashedsalt_data
$valContext

Returns

boolean —

Success

readCodepage()

readCodepage() 

CODEPAGE

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"

readDateMode()

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"

readFont()

readFont() 

Read a FONT record

readFormat()

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()

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"

readXfExt()

readXfExt() 

readStyle()

readStyle() 

Read STYLE record

readPalette()

readPalette() 

Read PALETTE record

readSheet()

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"

readExternalBook()

readExternalBook() 

Read EXTERNALBOOK record

readExternName()

readExternName() 

Read EXTERNNAME record.

readExternSheet()

readExternSheet() 

Read EXTERNSHEET record

readDefinedName()

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"

readMsoDrawingGroup()

readMsoDrawingGroup() 

Read MSODRAWINGGROUP record

readSst()

readSst() 

SST - Shared String Table

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"

readPrintGridlines()

readPrintGridlines() 

Read PRINTGRIDLINES record

readDefaultRowHeight()

readDefaultRowHeight() 

Read DEFAULTROWHEIGHT record

readSheetPr()

readSheetPr() 

Read SHEETPR record

readHorizontalPageBreaks()

readHorizontalPageBreaks() 

Read HORIZONTALPAGEBREAKS record

readVerticalPageBreaks()

readVerticalPageBreaks() 

Read VERTICALPAGEBREAKS record

readHeader()

readHeader() 

Read HEADER record

readFooter()

readFooter() 

Read FOOTER record

readHcenter()

readHcenter() 

Read HCENTER record

readVcenter()

readVcenter() 

Read VCENTER record

readLeftMargin()

readLeftMargin() 

Read LEFTMARGIN record

readRightMargin()

readRightMargin() 

Read RIGHTMARGIN record

readTopMargin()

readTopMargin() 

Read TOPMARGIN record

readBottomMargin()

readBottomMargin() 

Read BOTTOMMARGIN record

readPageSetup()

readPageSetup() 

Read PAGESETUP record

readProtect()

readProtect() 

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

readScenProtect()

readScenProtect() 

SCENPROTECT

readObjectProtect()

readObjectProtect() 

OBJECTPROTECT

readPassword()

readPassword() 

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

readDefColWidth()

readDefColWidth() 

Read DEFCOLWIDTH record

readColInfo()

readColInfo() 

Read COLINFO record

readRow()

readRow() 

ROW

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"

readRk()

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"

readLabelSst()

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.

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

readMulRk()

readMulRk() 

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

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

readNumber()

readNumber() 

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

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

readFormula()

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.

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

readSharedFmla()

readSharedFmla() 

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

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

readString()

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

Returns

string —

The string contents as UTF-8

readBoolErr()

readBoolErr() 

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

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

readMulBlank()

readMulBlank() 

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

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

readLabel()

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"

readBlank()

readBlank() 

Read BLANK record

readMsoDrawing()

readMsoDrawing() 

Read MSODRAWING record

readObj()

readObj() 

Read OBJ record

readWindow2()

readWindow2() 

Read WINDOW2 record

readPageLayoutView()

readPageLayoutView() 

Read PLV Record(Created by Excel2007 or upper)

readScl()

readScl() 

Read SCL record

readPane()

readPane() 

Read PANE record

readSelection()

readSelection() 

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

includeCellRangeFiltered()

includeCellRangeFiltered(  $cellRangeAddress) 

Parameters

$cellRangeAddress

readMergedCells()

readMergedCells() 

MERGEDCELLS

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

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

readHyperLink()

readHyperLink() 

Read HYPERLINK record

readDataValidations()

readDataValidations() 

Read DATAVALIDATIONS record

readDataValidation()

readDataValidation() 

Read DATAVALIDATION record

readSheetLayout()

readSheetLayout() 

Read SHEETLAYOUT record. Stores sheet tab color information.

readSheetProtection()

readSheetProtection() 

Read SHEETPROTECTION record (FEATHEADR)

readRangeProtection()

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

readImData()

readImData() 

Read IMDATA record

readContinue()

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.

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

getSplicedRecordData()

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

Returns

array

getFormulaFromStructure()

getFormulaFromStructure(string  $formulaStructure, string  $baseCell = 'A1') : string

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

Parameters

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

Returns

string —

Human readable formula

getFormulaFromData()

getFormulaFromData(string  $formulaData, string  $additionalData = '', string  $baseCell = 'A1') : string

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

Parameters

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

Returns

string —

Human readable formula

createFormulaFromTokens()

createFormulaFromTokens(array  $tokens, array  $additionalData) : string

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

Parameters

array $tokens
array $additionalData

Additional binary data going with the formula

Returns

string —

Human readable formula

getNextToken()

getNextToken(  $formulaData, string  $baseCell = 'A1') : array

Fetch next token from binary formula data

Parameters

$formulaData
string $baseCell

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

Throws

\PHPExcel_Reader_Exception

Returns

array

readBIFF8CellAddress()

readBIFF8CellAddress(string  $cellAddressStructure) : string

Reads a cell address in BIFF8 e.g. 'A2' or '$A$2' section 3.3.4

Parameters

string $cellAddressStructure

Returns

string

readBIFF8CellAddressB()

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

Parameters

string $cellAddressStructure
string $baseCell

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

Returns

string

readBIFF5CellRangeAddressFixed()

readBIFF5CellRangeAddressFixed(string  $subData) : string

Reads a cell range address in BIFF5 e.g. 'A2:B6' or 'A1' always fixed range section 2.5.14

Parameters

string $subData

Throws

\PHPExcel_Reader_Exception

Returns

string

readBIFF8CellRangeAddressFixed()

readBIFF8CellRangeAddressFixed(string  $subData) : string

Reads a cell range address in BIFF8 e.g. 'A2:B6' or 'A1' always fixed range section 2.5.14

Parameters

string $subData

Throws

\PHPExcel_Reader_Exception

Returns

string

readBIFF8CellRangeAddress()

readBIFF8CellRangeAddress(string  $subData) : string

Reads a cell range address in BIFF8 e.g. 'A2:B6' or '$A$2:$B$6' there are flags indicating whether column/row index is relative section 3.3.4

Parameters

string $subData

Returns

string

readBIFF8CellRangeAddressB()

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

Parameters

string $subData
string $baseCell

Base cell

Returns

string —

Cell range address

readBIFF8CellRangeAddressList()

readBIFF8CellRangeAddressList(string  $subData) : array

Read BIFF8 cell range address list section 2.5.15

Parameters

string $subData

Returns

array

readBIFF5CellRangeAddressList()

readBIFF5CellRangeAddressList(string  $subData) : array

Read BIFF5 cell range address list section 2.5.15

Parameters

string $subData

Returns

array

readSheetRangeByRefIndex()

readSheetRangeByRefIndex(integer  $index) : 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 PHPExcel_Reader_Exception is thrown

Parameters

integer $index

Throws

\PHPExcel_Reader_Exception

Returns

string|false

readBIFF8ConstantArray()

readBIFF8ConstantArray(string  $arrayData) : array

read BIFF8 constant value array from array data returns e.g. array('value' => '{1,2;3,4}', 'size' => 40} section 2.5.8

Parameters

string $arrayData

Returns

array

readBIFF8Constant()

readBIFF8Constant(string  $valueData) : array

read BIFF8 constant value which may be 'Empty Value', 'Number', 'String Value', 'Boolean Value', 'Error Value' section 2.5.7 returns e.g. array('value' => '5', 'size' => 9)

Parameters

string $valueData

Returns

array

readRGB()

readRGB(string  $rgb) : array

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

Parameters

string $rgb

Encoded RGB value (4 bytes)

Returns

array

readByteStringShort()

readByteStringShort(string  $subData) : array

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

Parameters

string $subData

Returns

array

readByteStringLong()

readByteStringLong(string  $subData) : array

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

Parameters

string $subData

Returns

array

readUnicodeStringShort()

readUnicodeStringShort(string  $subData) : array

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.

Parameters

string $subData

Returns

array

readUnicodeStringLong()

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

Parameters

string $subData

Returns

array

readUnicodeString()

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

Parameters

string $subData
integer $characterCount

Returns

array

UTF8toExcelDoubleQuoted()

UTF8toExcelDoubleQuoted(string  $value) : string

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

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

Parameters

string $value

UTF-8 encoded string

Returns

string

extractNumber()

extractNumber(string  $data) : float

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

Parameters

string $data

Binary string that is at least 8 bytes long

Returns

float

getIEEE754()

getIEEE754(  $rknum) 

Parameters

$rknum

encodeUTF16()

encodeUTF16(string  $string, boolean  $compressed = '') : string

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

Parameters

string $string
boolean $compressed

Returns

string

uncompressByteString()

uncompressByteString(string  $string) : string

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

Parameters

string $string

Returns

string

decodeCodepage()

decodeCodepage(string  $string) : string

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

Parameters

string $string

Returns

string

parseRichText()

parseRichText(  $is = '') 

Parameters

$is