\PHPExcel_Reader_Excel5

PHPExcel_Reader_Excel5

This class uses {@link http://sourceforge.net/projects/phpexcelreader/parseXL}

Summary

Methods
Properties
Constants
getReadDataOnly()
setReadDataOnly()
getIncludeCharts()
setIncludeCharts()
getLoadSheetsOnly()
setLoadSheetsOnly()
setLoadAllSheets()
getReadFilter()
setReadFilter()
canRead()
__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
$_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()
_readColor()
_mapBorderStyle()
_mapFillPattern()
_mapErrorCode()
_mapBuiltInColor()
_mapColorBIFF5()
_mapColor()
_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 = 0x600

XLS_BIFF7

XLS_BIFF7 = 0x500

XLS_WorkbookGlobals

XLS_WorkbookGlobals = 0x5

XLS_Worksheet

XLS_Worksheet = 0x10

XLS_Type_FORMULA

XLS_Type_FORMULA = 0x6

XLS_Type_EOF

XLS_Type_EOF = 0xa

XLS_Type_PROTECT

XLS_Type_PROTECT = 0x12

XLS_Type_OBJECTPROTECT

XLS_Type_OBJECTPROTECT = 0x63

XLS_Type_SCENPROTECT

XLS_Type_SCENPROTECT = 0xdd

XLS_Type_PASSWORD

XLS_Type_PASSWORD = 0x13

XLS_Type_HEADER

XLS_Type_HEADER = 0x14

XLS_Type_EXTERNSHEET

XLS_Type_EXTERNSHEET = 0x17

XLS_Type_DEFINEDNAME

XLS_Type_DEFINEDNAME = 0x18

XLS_Type_VERTICALPAGEBREAKS

XLS_Type_VERTICALPAGEBREAKS = 0x1a

XLS_Type_HORIZONTALPAGEBREAKS

XLS_Type_HORIZONTALPAGEBREAKS = 0x1b

XLS_Type_NOTE

XLS_Type_NOTE = 0x1c

XLS_Type_SELECTION

XLS_Type_SELECTION = 0x1d

XLS_Type_DATEMODE

XLS_Type_DATEMODE = 0x22

XLS_Type_EXTERNNAME

XLS_Type_EXTERNNAME = 0x23

XLS_Type_LEFTMARGIN

XLS_Type_LEFTMARGIN = 0x26

XLS_Type_RIGHTMARGIN

XLS_Type_RIGHTMARGIN = 0x27

XLS_Type_TOPMARGIN

XLS_Type_TOPMARGIN = 0x28

XLS_Type_BOTTOMMARGIN

XLS_Type_BOTTOMMARGIN = 0x29

XLS_Type_PRINTGRIDLINES

XLS_Type_PRINTGRIDLINES = 0x2b

XLS_Type_FILEPASS

XLS_Type_FILEPASS = 0x2f

XLS_Type_FONT

XLS_Type_FONT = 0x31

XLS_Type_CONTINUE

XLS_Type_CONTINUE = 0x3c

XLS_Type_PANE

XLS_Type_PANE = 0x41

XLS_Type_CODEPAGE

XLS_Type_CODEPAGE = 0x42

XLS_Type_DEFCOLWIDTH

XLS_Type_DEFCOLWIDTH = 0x55

XLS_Type_OBJ

XLS_Type_OBJ = 0x5d

XLS_Type_COLINFO

XLS_Type_COLINFO = 0x7d

XLS_Type_IMDATA

XLS_Type_IMDATA = 0x7f

XLS_Type_SHEETPR

XLS_Type_SHEETPR = 0x81

XLS_Type_HCENTER

XLS_Type_HCENTER = 0x83

XLS_Type_VCENTER

XLS_Type_VCENTER = 0x84

XLS_Type_SHEET

XLS_Type_SHEET = 0x85

XLS_Type_PALETTE

XLS_Type_PALETTE = 0x92

XLS_Type_SCL

XLS_Type_SCL = 0xa0

XLS_Type_PAGESETUP

XLS_Type_PAGESETUP = 0xa1

XLS_Type_MULRK

XLS_Type_MULRK = 0xbd

XLS_Type_MULBLANK

XLS_Type_MULBLANK = 0xbe

XLS_Type_DBCELL

XLS_Type_DBCELL = 0xd7

XLS_Type_XF

XLS_Type_XF = 0xe0

XLS_Type_MERGEDCELLS

XLS_Type_MERGEDCELLS = 0xe5

XLS_Type_MSODRAWINGGROUP

XLS_Type_MSODRAWINGGROUP = 0xeb

XLS_Type_MSODRAWING

XLS_Type_MSODRAWING = 0xec

XLS_Type_SST

XLS_Type_SST = 0xfc

XLS_Type_LABELSST

XLS_Type_LABELSST = 0xfd

XLS_Type_EXTSST

XLS_Type_EXTSST = 0xff

XLS_Type_EXTERNALBOOK

XLS_Type_EXTERNALBOOK = 0x1ae

XLS_Type_DATAVALIDATIONS

XLS_Type_DATAVALIDATIONS = 0x1b2

XLS_Type_TXO

XLS_Type_TXO = 0x1b6

XLS_Type_DATAVALIDATION

XLS_Type_DATAVALIDATION = 0x1be

XLS_Type_DIMENSION

XLS_Type_DIMENSION = 0x200

XLS_Type_BLANK

XLS_Type_BLANK = 0x201

XLS_Type_NUMBER

XLS_Type_NUMBER = 0x203

XLS_Type_LABEL

XLS_Type_LABEL = 0x204

XLS_Type_BOOLERR

XLS_Type_BOOLERR = 0x205

XLS_Type_STRING

XLS_Type_STRING = 0x207

XLS_Type_ROW

XLS_Type_ROW = 0x208

XLS_Type_INDEX

XLS_Type_INDEX = 0x20b

XLS_Type_ARRAY

XLS_Type_ARRAY = 0x221

XLS_Type_DEFAULTROWHEIGHT

XLS_Type_DEFAULTROWHEIGHT = 0x225

XLS_Type_WINDOW2

XLS_Type_WINDOW2 = 0x23e

XLS_Type_RK

XLS_Type_RK = 0x27e

XLS_Type_STYLE

XLS_Type_STYLE = 0x293

XLS_Type_FORMAT

XLS_Type_FORMAT = 0x41e

XLS_Type_SHAREDFMLA

XLS_Type_SHAREDFMLA = 0x4bc

XLS_Type_BOF

XLS_Type_BOF = 0x809

XLS_Type_SHEETPROTECTION

XLS_Type_SHEETPROTECTION = 0x867

XLS_Type_RANGEPROTECTION

XLS_Type_RANGEPROTECTION = 0x868

XLS_Type_SHEETLAYOUT

XLS_Type_SHEETLAYOUT = 0x862

XLS_Type_XFEXT

XLS_Type_XFEXT = 0x87d

XLS_Type_PAGELAYOUTVIEW

XLS_Type_PAGELAYOUTVIEW = 0x88b

XLS_Type_UNKNOWN

XLS_Type_UNKNOWN = 0xffff

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 = 0x400

Properties

$_readDataOnly

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

Type

bool

$_includeCharts

$_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;

Type

bool

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

$_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 : int

Size in bytes of $this->_data

Type

int

$_pos

$_pos : int

Current position in stream

Type

int

$_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 : int

BIFF version

Type

int

$_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 : bool

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

Type

bool

$_isFitToPages

$_isFitToPages : bool

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

Type

bool

$_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 : int

Keep track of XF index

Type

int

$_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 : int

The type of encryption in use

Type

int

$_encryptionStartPos

$_encryptionStartPos : int

The position in the stream after which contents are encrypted

Type

int

$_rc4Pos

$_rc4Pos : int

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

Type

int

$_md5Ctxt

$_md5Ctxt : string

The current MD5 context state

Type

string

Methods

getReadDataOnly()

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

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

Returns

bool —

setReadDataOnly()

setReadDataOnly(bool  $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

bool $pValue

Returns

\PHPExcel_Reader_IReader —

getIncludeCharts()

getIncludeCharts() : bool

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

Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. If false (the default) it will ignore any charts defined in the workbook file.

Returns

bool —

setIncludeCharts()

setIncludeCharts(bool  $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

bool $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 —

getReadFilter()

getReadFilter() : \PHPExcel_Reader_IReadFilter

Read filter

Returns

\PHPExcel_Reader_IReadFilter —

setReadFilter()

setReadFilter(\PHPExcel_Reader_IReadFilter  $pValue) : \PHPExcel_Reader_IReader

Set read filter

Parameters

\PHPExcel_Reader_IReadFilter $pValue

Returns

\PHPExcel_Reader_IReader —

canRead()

canRead(string  $pFilename) : bool

Can the current PHPExcel_Reader_IReader read the file?

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

bool —

__construct()

__construct() : mixed

Create a new PHPExcel_Reader_Excel5 instance

Returns

mixed —

listWorksheetNames()

listWorksheetNames(string  $pFilename) : mixed

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

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

mixed —

listWorksheetInfo()

listWorksheetInfo(string  $pFilename) : mixed

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

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

mixed —

load()

load(string  $pFilename) : \PHPExcel

Loads PHPExcel from file

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

\PHPExcel —

_GetInt2d()

_GetInt2d(string  $data, int  $pos) : int

Read 16-bit unsigned integer

Parameters

string $data
int $pos

Returns

int —

_GetInt4d()

_GetInt4d(string  $data, int  $pos) : int

Read 32-bit signed integer

Parameters

string $data
int $pos

Returns

int —

_openFile()

_openFile(string  $pFilename) : resource

Open file for reading

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

resource —

_readRecordData()

_readRecordData(string  $data, int  $pos, mixed  $len) : string

Read record data from stream, decrypting as required

Parameters

string $data

Data stream to read from

int $pos

Position to start reading from

mixed $len

Returns

string —

Record data

_loadOLE()

_loadOLE(string  $pFilename) : mixed

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

Parameters

string $pFilename

Returns

mixed —

_readSummaryInformation()

_readSummaryInformation() : mixed

Read summary information

Returns

mixed —

_readDocumentSummaryInformation()

_readDocumentSummaryInformation() : mixed

Read additional document summary information

Returns

mixed —

_readDefault()

_readDefault() : mixed

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

Returns

mixed —

_readNote()

_readNote() : mixed

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.

Returns

mixed —

_readTextObject()

_readTextObject() : mixed

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

Returns

mixed —

_readBof()

_readBof() : mixed

Read BOF

Returns

mixed —

_readFilepass()

_readFilepass() : mixed

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/

Returns

mixed —

_makeKey()

_makeKey(mixed  $block, mixed  $valContext) : \PHPExcel_Reader_Excel5_RC4

Make an RC4 decryptor for the given block

Parameters

mixed $block
mixed $valContext

Returns

\PHPExcel_Reader_Excel5_RC4 —

_verifyPassword()

_verifyPassword(mixed  $password, mixed  $docid, mixed  $salt_data, mixed  $hashedsalt_data, mixed  $valContext) : bool

Verify RC4 file password

Parameters

mixed $password
mixed $docid
mixed $salt_data
mixed $hashedsalt_data
mixed $valContext

Returns

bool —

Success

_readCodepage()

_readCodepage() : mixed

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"

Returns

mixed —

_readDateMode()

_readDateMode() : mixed

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"

Returns

mixed —

_readFont()

_readFont() : mixed

Read a FONT record

Returns

mixed —

_readFormat()

_readFormat() : mixed

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"

Returns

mixed —

_readXf()

_readXf() : mixed

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"

Returns

mixed —

_readXfExt()

_readXfExt() : mixed

Returns

mixed —

_readStyle()

_readStyle() : mixed

Read STYLE record

Returns

mixed —

_readPalette()

_readPalette() : mixed

Read PALETTE record

Returns

mixed —

_readSheet()

_readSheet() : mixed

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"

Returns

mixed —

_readExternalBook()

_readExternalBook() : mixed

Read EXTERNALBOOK record

Returns

mixed —

_readExternName()

_readExternName() : mixed

Read EXTERNNAME record.

Returns

mixed —

_readExternSheet()

_readExternSheet() : mixed

Read EXTERNSHEET record

Returns

mixed —

_readDefinedName()

_readDefinedName() : mixed

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"

Returns

mixed —

_readMsoDrawingGroup()

_readMsoDrawingGroup() : mixed

Read MSODRAWINGGROUP record

Returns

mixed —

_readSst()

_readSst() : mixed

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"

Returns

mixed —

_readPrintGridlines()

_readPrintGridlines() : mixed

Read PRINTGRIDLINES record

Returns

mixed —

_readDefaultRowHeight()

_readDefaultRowHeight() : mixed

Read DEFAULTROWHEIGHT record

Returns

mixed —

_readSheetPr()

_readSheetPr() : mixed

Read SHEETPR record

Returns

mixed —

_readHorizontalPageBreaks()

_readHorizontalPageBreaks() : mixed

Read HORIZONTALPAGEBREAKS record

Returns

mixed —

_readVerticalPageBreaks()

_readVerticalPageBreaks() : mixed

Read VERTICALPAGEBREAKS record

Returns

mixed —

_readHeader()

_readHeader() : mixed

Read HEADER record

Returns

mixed —

_readFooter()

_readFooter() : mixed

Read FOOTER record

Returns

mixed —

_readHcenter()

_readHcenter() : mixed

Read HCENTER record

Returns

mixed —

_readVcenter()

_readVcenter() : mixed

Read VCENTER record

Returns

mixed —

_readLeftMargin()

_readLeftMargin() : mixed

Read LEFTMARGIN record

Returns

mixed —

_readRightMargin()

_readRightMargin() : mixed

Read RIGHTMARGIN record

Returns

mixed —

_readTopMargin()

_readTopMargin() : mixed

Read TOPMARGIN record

Returns

mixed —

_readBottomMargin()

_readBottomMargin() : mixed

Read BOTTOMMARGIN record

Returns

mixed —

_readPageSetup()

_readPageSetup() : mixed

Read PAGESETUP record

Returns

mixed —

_readProtect()

_readProtect() : mixed

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

Returns

mixed —

_readScenProtect()

_readScenProtect() : mixed

SCENPROTECT

Returns

mixed —

_readObjectProtect()

_readObjectProtect() : mixed

OBJECTPROTECT

Returns

mixed —

_readPassword()

_readPassword() : mixed

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

Returns

mixed —

_readDefColWidth()

_readDefColWidth() : mixed

Read DEFCOLWIDTH record

Returns

mixed —

_readColInfo()

_readColInfo() : mixed

Read COLINFO record

Returns

mixed —

_readRow()

_readRow() : mixed

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"

Returns

mixed —

_readRk()

_readRk() : mixed

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"

Returns

mixed —

_readLabelSst()

_readLabelSst() : mixed

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"

Returns

mixed —

_readMulRk()

_readMulRk() : mixed

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"

Returns

mixed —

_readNumber()

_readNumber() : mixed

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

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

Returns

mixed —

_readFormula()

_readFormula() : mixed

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"

Returns

mixed —

_readSharedFmla()

_readSharedFmla() : mixed

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.

Returns

mixed —

_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() : mixed

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

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

Returns

mixed —

_readMulBlank()

_readMulBlank() : mixed

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"

Returns

mixed —

_readLabel()

_readLabel() : mixed

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"

Returns

mixed —

_readBlank()

_readBlank() : mixed

Read BLANK record

Returns

mixed —

_readMsoDrawing()

_readMsoDrawing() : mixed

Read MSODRAWING record

Returns

mixed —

_readObj()

_readObj() : mixed

Read OBJ record

Returns

mixed —

_readWindow2()

_readWindow2() : mixed

Read WINDOW2 record

Returns

mixed —

_readPageLayoutView()

_readPageLayoutView() : mixed

Read PLV Record(Created by Excel2007 or upper)

Returns

mixed —

_readScl()

_readScl() : mixed

Read SCL record

Returns

mixed —

_readPane()

_readPane() : mixed

Read PANE record

Returns

mixed —

_readSelection()

_readSelection() : mixed

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

Returns

mixed —

_includeCellRangeFiltered()

_includeCellRangeFiltered(mixed  $cellRangeAddress) : mixed

Parameters

mixed $cellRangeAddress

Returns

mixed —

_readMergedCells()

_readMergedCells() : mixed

MERGEDCELLS

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

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

Returns

mixed —

_readHyperLink()

_readHyperLink() : mixed

Read HYPERLINK record

Returns

mixed —

_readDataValidations()

_readDataValidations() : mixed

Read DATAVALIDATIONS record

Returns

mixed —

_readDataValidation()

_readDataValidation() : mixed

Read DATAVALIDATION record

Returns

mixed —

_readSheetLayout()

_readSheetLayout() : mixed

Read SHEETLAYOUT record. Stores sheet tab color information.

Returns

mixed —

_readSheetProtection()

_readSheetProtection() : mixed

Read SHEETPROTECTION record (FEATHEADR)

Returns

mixed —

_readRangeProtection()

_readRangeProtection() : mixed

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

Returns

mixed —

_readImData()

_readImData() : mixed

Read IMDATA record

Returns

mixed —

_readContinue()

_readContinue() : mixed

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

Returns

mixed —

_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(mixed  $formulaData, string  $baseCell = 'A1') : array

Fetch next token from binary formula data

Parameters

mixed $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(int  $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

int $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, int  $characterCount) : array

Read Unicode string with no string length field, but with known character count this function is under construction, needs to support rich text, and Asian phonetic settings OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.3

Parameters

string $subData
int $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(mixed  $rknum) : mixed

Parameters

mixed $rknum

Returns

mixed —

_encodeUTF16()

_encodeUTF16(string  $string, bool  $compressed = '') : string

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

Parameters

string $string
bool $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 —

_readColor()

_readColor(int  $color, array  $palette, mixed  $version) : array

Read color

Parameters

int $color

Indexed color

array $palette

Color palette

mixed $version

Returns

array —

RGB color value, example: array('rgb' => 'FF0000')

_mapBorderStyle()

_mapBorderStyle(int  $index) : string

Map border style OpenOffice documentation: 2.5.11

Parameters

int $index

Returns

string —

_mapFillPattern()

_mapFillPattern(int  $index) : string

Get fill pattern from index OpenOffice documentation: 2.5.12

Parameters

int $index

Returns

string —

_mapErrorCode()

_mapErrorCode(int  $subData) : string

Map error code, e.g. '#N/A'

Parameters

int $subData

Returns

string —

_mapBuiltInColor()

_mapBuiltInColor(int  $color) : array

Map built-in color to RGB value

Parameters

int $color

Indexed color

Returns

array —

_mapColorBIFF5()

_mapColorBIFF5(int  $subData) : array

Map color array from BIFF5 built-in color index

Parameters

int $subData

Returns

array —

_mapColor()

_mapColor(int  $subData) : array

Map color array from BIFF8 built-in color index

Parameters

int $subData

Returns

array —

_parseRichText()

_parseRichText(mixed  $is = '') : mixed

Parameters

mixed $is

Returns

mixed —