Overview

Packages

  • JAMA
  • None
  • PHP
  • PHPExcel
    • CachedObjectStorage
    • Calculation
    • Cell
    • Chart
      • Renderer
    • Reader
      • Excel2007
      • Excel5
    • RichText
    • Settings
    • Shared
      • Escher
      • OLE
      • Trend
      • ZipArchive
    • Style
    • Worksheet
      • Drawing
    • Writer
      • 2007
      • CSV
      • Excel2007
      • Excel5
      • HTML
      • PDF

Classes

  • PHPExcel_Reader_Excel5
  • PHPExcel_Reader_Excel5_Escher
  • PHPExcel_Reader_Excel5_MD5
  • PHPExcel_Reader_Excel5_RC4
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Class PHPExcel_Reader_Excel5

PHPExcel_Reader_Excel5

This class uses http://sourceforge.net/projects/phpexcelreader/parseXL

PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader
Extended by PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
Package: PHPExcel\Reader\Excel5
Category: PHPExcel
Copyright: Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
License: LGPL
Located at controlador/include/phpexcel/PHPExcel/Reader/Excel5.php
Methods summary
public
# __construct( )

Create a new PHPExcel_Reader_Excel5 instance

Create a new PHPExcel_Reader_Excel5 instance

public boolean
# canRead( string $pFilename )

Can the current PHPExcel_Reader_IReader read the file?

Can the current PHPExcel_Reader_IReader read the file?

Parameters

$pFilename

Returns

boolean

Throws

PHPExcel_Reader_Exception

Overrides

PHPExcel_Reader_Abstract::canRead()

Implementation of

PHPExcel_Reader_IReader::canRead()
public
# listWorksheetNames( string $pFilename )

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

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

Parameters

$pFilename

Throws

PHPExcel_Reader_Exception
public
# listWorksheetInfo( string $pFilename )

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

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

Parameters

$pFilename

Throws

PHPExcel_Reader_Exception
public PHPExcel
# load( string $pFilename )

Loads PHPExcel from file

Loads PHPExcel from file

Parameters

$pFilename

Returns

PHPExcel

Throws

PHPExcel_Reader_Exception

Implementation of

PHPExcel_Reader_IReader::load()
private string
# _readRecordData( string $data, integer $pos, integer $len )

Read record data from stream, decrypting as required

Read record data from stream, decrypting as required

Parameters

$data
Data stream to read from
$pos
Position to start reading from
$len
$length Record data length

Returns

string
Record data
private
# _loadOLE( string $pFilename )

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

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

Parameters

$pFilename
private
# _readSummaryInformation( )

Read summary information

Read summary information

private
# _readDocumentSummaryInformation( )

Read additional document summary information

Read additional document summary information

private
# _readDefault( )

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

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

private
# _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.

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.

private
# _readTextObject( )

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

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

private
# _readBof( )

Read BOF

Read BOF

private
# _readFilepass( )

FILEPASS

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/

private PHPExcel_Reader_Excel5_RC4
# _makeKey( $block, $valContext )

Make an RC4 decryptor for the given block

Make an RC4 decryptor for the given block

Returns

PHPExcel_Reader_Excel5_RC4

Var

int $block Block for which to create decrypto
string $valContext MD5 context state
private boolean
# _verifyPassword( $password, $docid, $salt_data, $hashedsalt_data, & $valContext )

Verify RC4 file password

Verify RC4 file password

Returns

boolean
Success

Var

string $password Password to check
string $docid Document id
string $salt_data Salt data
string $hashedsalt_data Hashed salt data
string &$valContext Set to the MD5 context of the value
private
# _readCodepage( )

CODEPAGE

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"

private
# _readDateMode( )

DATEMODE

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"

private
# _readFont( )

Read a FONT record

Read a FONT record

private
# _readFormat( )

FORMAT

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"

private
# _readXf( )

XF - Extended Format

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"

private
# _readXfExt( )
private
# _readStyle( )

Read STYLE record

Read STYLE record

private
# _readPalette( )

Read PALETTE record

Read PALETTE record

private
# _readSheet( )

SHEET

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"

private
# _readExternalBook( )

Read EXTERNALBOOK record

Read EXTERNALBOOK record

private
# _readExternName( )

Read EXTERNNAME record.

Read EXTERNNAME record.

private
# _readExternSheet( )

Read EXTERNSHEET record

Read EXTERNSHEET record

private
# _readDefinedName( )

DEFINEDNAME

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"

private
# _readMsoDrawingGroup( )

Read MSODRAWINGGROUP record

Read MSODRAWINGGROUP record

private
# _readSst( )

SST - Shared String Table

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"

private
# _readPrintGridlines( )

Read PRINTGRIDLINES record

Read PRINTGRIDLINES record

private
# _readDefaultRowHeight( )

Read DEFAULTROWHEIGHT record

Read DEFAULTROWHEIGHT record

private
# _readSheetPr( )

Read SHEETPR record

Read SHEETPR record

private
# _readHorizontalPageBreaks( )

Read HORIZONTALPAGEBREAKS record

Read HORIZONTALPAGEBREAKS record

private
# _readVerticalPageBreaks( )

Read VERTICALPAGEBREAKS record

Read VERTICALPAGEBREAKS record

private
# _readHeader( )

Read HEADER record

Read HEADER record

private
# _readFooter( )

Read FOOTER record

Read FOOTER record

private
# _readHcenter( )

Read HCENTER record

Read HCENTER record

private
# _readVcenter( )

Read VCENTER record

Read VCENTER record

private
# _readLeftMargin( )

Read LEFTMARGIN record

Read LEFTMARGIN record

private
# _readRightMargin( )

Read RIGHTMARGIN record

Read RIGHTMARGIN record

private
# _readTopMargin( )

Read TOPMARGIN record

Read TOPMARGIN record

private
# _readBottomMargin( )

Read BOTTOMMARGIN record

Read BOTTOMMARGIN record

private
# _readPageSetup( )

Read PAGESETUP record

Read PAGESETUP record

private
# _readProtect( )

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

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

private
# _readScenProtect( )

SCENPROTECT

SCENPROTECT

private
# _readObjectProtect( )

OBJECTPROTECT

OBJECTPROTECT

private
# _readPassword( )

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

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

private
# _readDefColWidth( )

Read DEFCOLWIDTH record

Read DEFCOLWIDTH record

private
# _readColInfo( )

Read COLINFO record

Read COLINFO record

private
# _readRow( )

ROW

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"

private
# _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.

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"

private
# _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.

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"

private
# _readMulRk( )

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

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"

private
# _readNumber( )

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

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

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

private
# _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.

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"

private
# _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.

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.

private string
# _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

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
private
# _readBoolErr( )

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

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

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

private
# _readMulBlank( )

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

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"

private
# _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.

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"

private
# _readBlank( )

Read BLANK record

Read BLANK record

private
# _readMsoDrawing( )

Read MSODRAWING record

Read MSODRAWING record

private
# _readObj( )

Read OBJ record

Read OBJ record

private
# _readWindow2( )

Read WINDOW2 record

Read WINDOW2 record

private
# _readPageLayoutView( )

Read PLV Record(Created by Excel2007 or upper)

Read PLV Record(Created by Excel2007 or upper)

private
# _readScl( )

Read SCL record

Read SCL record

private
# _readPane( )

Read PANE record

Read PANE record

private
# _readSelection( )

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

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

private
# _includeCellRangeFiltered( $cellRangeAddress )
private
# _readMergedCells( )

MERGEDCELLS

MERGEDCELLS

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

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

private
# _readHyperLink( )

Read HYPERLINK record

Read HYPERLINK record

private
# _readDataValidations( )

Read DATAVALIDATIONS record

Read DATAVALIDATIONS record

private
# _readDataValidation( )

Read DATAVALIDATION record

Read DATAVALIDATION record

private
# _readSheetLayout( )

Read SHEETLAYOUT record. Stores sheet tab color information.

Read SHEETLAYOUT record. Stores sheet tab color information.

private
# _readSheetProtection( )

Read SHEETPROTECTION record (FEATHEADR)

Read SHEETPROTECTION record (FEATHEADR)

private
# _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

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

private
# _readImData( )

Read IMDATA record

Read IMDATA record

private
# _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

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

private array
# _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. Moves to next current position in data stream to start of next record different from a CONtINUE record

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
private string
# _getFormulaFromStructure( string $formulaStructure, string $baseCell = 'A1' )

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

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

Parameters

$formulaStructure
The complete binary data for the formula
$baseCell
Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas

Returns

string
Human readable formula
private string
# _getFormulaFromData( string $formulaData, string $additionalData = '', string $baseCell = 'A1' )

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

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

Parameters

$formulaData
The binary data for the formula itself
$additionalData
Additional binary data going with the formula
$baseCell
Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas

Returns

string
Human readable formula
private string
# _createFormulaFromTokens( array $tokens, array $additionalData, string $baseCell,… )

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

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

Parameters

$tokens
$additionalData
Additional binary data going with the formula
$baseCell,…
Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas

Returns

string
Human readable formula
private array
# _getNextToken( string $formulaData, string $baseCell = 'A1' )

Fetch next token from binary formula data

Fetch next token from binary formula data

Parameters

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

Returns

array

Throws

PHPExcel_Reader_Exception
private string
# _readBIFF8CellAddress( string $cellAddressStructure )

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

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

Parameters

$cellAddressStructure

Returns

string
private string
# _readBIFF8CellAddressB( string $cellAddressStructure, string $baseCell = 'A1' )

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

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

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

Returns

string
private string
# _readBIFF5CellRangeAddressFixed( string $subData )

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

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

Parameters

$subData

Returns

string

Throws

PHPExcel_Reader_Exception
private string
# _readBIFF8CellRangeAddressFixed( string $subData )

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

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

Parameters

$subData

Returns

string

Throws

PHPExcel_Reader_Exception
private string
# _readBIFF8CellRangeAddress( string $subData )

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

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

$subData

Returns

string
private string
# _readBIFF8CellRangeAddressB( string $subData, string $baseCell = 'A1' )

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

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

$subData
$baseCell
Base cell

Returns

string
Cell range address
private array
# _readBIFF8CellRangeAddressList( string $subData )

Read BIFF8 cell range address list section 2.5.15

Read BIFF8 cell range address list section 2.5.15

Parameters

$subData

Returns

array
private array
# _readBIFF5CellRangeAddressList( string $subData )

Read BIFF5 cell range address list section 2.5.15

Read BIFF5 cell range address list section 2.5.15

Parameters

$subData

Returns

array
private string|false
# _readSheetRangeByRefIndex( integer $index )

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

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

$index

Returns

string|false

Throws

PHPExcel_Reader_Exception
private static array
# _readBIFF8ConstantArray( string $arrayData )

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

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

Parameters

$arrayData

Returns

array
private static array
# _readBIFF8Constant( string $valueData )

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)

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

$valueData

Returns

array
private static array
# _readRGB( string $rgb )

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

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

Parameters

$rgb
Encoded RGB value (4 bytes)

Returns

array
private array
# _readByteStringShort( string $subData )

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

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

Parameters

$subData

Returns

array
private array
# _readByteStringLong( string $subData )

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

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

Parameters

$subData

Returns

array
private static array
# _readUnicodeStringShort( string $subData )

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.

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

$subData

Returns

array
private static array
# _readUnicodeStringLong( string $subData )

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

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

$subData

Returns

array
private static array
# _readUnicodeString( string $subData, integer $characterCount )

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

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

$subData
$characterCount

Returns

array
private static string
# _UTF8toExcelDoubleQuoted( string $value )

Convert UTF-8 string to string surounded by double quotes. Used for explicit string tokens in formulas. Example: hello"world --> "hello""world"

Convert UTF-8 string to string surounded by double quotes. Used for explicit string tokens in formulas. Example: hello"world --> "hello""world"

Parameters

$value
UTF-8 encoded string

Returns

string
private static float
# _extractNumber( string $data )

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

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

Parameters

$data
Binary string that is at least 8 bytes long

Returns

float
private static
# _GetIEEE754( $rknum )
private static string
# _encodeUTF16( string $string, boolean $compressed = '' )

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

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

Parameters

$string
$compressed

Returns

string
private static string
# _uncompressByteString( string $string )

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

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

Parameters

$string

Returns

string
private string
# _decodeCodepage( string $string )

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

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

Parameters

$string

Returns

string
public static integer
# _GetInt2d( string $data, integer $pos )

Read 16-bit unsigned integer

Read 16-bit unsigned integer

Parameters

$data
$pos

Returns

integer
public static integer
# _GetInt4d( string $data, integer $pos )

Read 32-bit signed integer

Read 32-bit signed integer

Parameters

$data
$pos

Returns

integer
private static array
# _readColor( integer $color, array $palette, $version )

Read color

Read color

Parameters

$color
Indexed color
$palette
Color palette
$version

Returns

array
RGB color value, example: array('rgb' => 'FF0000')
private static string
# _mapBorderStyle( integer $index )

Map border style OpenOffice documentation: 2.5.11

Map border style OpenOffice documentation: 2.5.11

Parameters

$index

Returns

string
private static string
# _mapFillPattern( integer $index )

Get fill pattern from index OpenOffice documentation: 2.5.12

Get fill pattern from index OpenOffice documentation: 2.5.12

Parameters

$index

Returns

string
private static string
# _mapErrorCode( integer $subData )

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

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

Parameters

$subData

Returns

string
private static array
# _mapBuiltInColor( integer $color )

Map built-in color to RGB value

Map built-in color to RGB value

Parameters

$color
Indexed color

Returns

array
private static array
# _mapColorBIFF5( integer $subData )

Map color array from BIFF5 built-in color index

Map color array from BIFF5 built-in color index

Parameters

$subData

Returns

array
private static array
# _mapColor( integer $subData )

Map color array from BIFF8 built-in color index

Map color array from BIFF8 built-in color index

Parameters

$subData

Returns

array
private
# _parseRichText( $is = '' )
Methods inherited from PHPExcel_Reader_Abstract
_openFile(), getIncludeCharts(), getLoadSheetsOnly(), getReadDataOnly(), getReadFilter(), setIncludeCharts(), setLoadAllSheets(), setLoadSheetsOnly(), setReadDataOnly(), setReadFilter()
Constants summary
integer XLS_BIFF8
# 0x0600
integer XLS_BIFF7
# 0x0500
integer XLS_WorkbookGlobals
# 0x0005
integer XLS_Worksheet
# 0x0010
integer XLS_Type_FORMULA
# 0x0006
integer XLS_Type_EOF
# 0x000a
integer XLS_Type_PROTECT
# 0x0012
integer XLS_Type_OBJECTPROTECT
# 0x0063
integer XLS_Type_SCENPROTECT
# 0x00dd
integer XLS_Type_PASSWORD
# 0x0013
integer XLS_Type_HEADER
# 0x0014
integer XLS_Type_FOOTER
# 0x0015
integer XLS_Type_EXTERNSHEET
# 0x0017
integer XLS_Type_DEFINEDNAME
# 0x0018
integer XLS_Type_VERTICALPAGEBREAKS
# 0x001a
integer XLS_Type_HORIZONTALPAGEBREAKS
# 0x001b
integer XLS_Type_NOTE
# 0x001c
integer XLS_Type_SELECTION
# 0x001d
integer XLS_Type_DATEMODE
# 0x0022
integer XLS_Type_EXTERNNAME
# 0x0023
integer XLS_Type_LEFTMARGIN
# 0x0026
integer XLS_Type_RIGHTMARGIN
# 0x0027
integer XLS_Type_TOPMARGIN
# 0x0028
integer XLS_Type_BOTTOMMARGIN
# 0x0029
integer XLS_Type_PRINTGRIDLINES
# 0x002b
integer XLS_Type_FILEPASS
# 0x002f
integer XLS_Type_FONT
# 0x0031
integer XLS_Type_CONTINUE
# 0x003c
integer XLS_Type_PANE
# 0x0041
integer XLS_Type_CODEPAGE
# 0x0042
integer XLS_Type_DEFCOLWIDTH
# 0x0055
integer XLS_Type_OBJ
# 0x005d
integer XLS_Type_COLINFO
# 0x007d
integer XLS_Type_IMDATA
# 0x007f
integer XLS_Type_SHEETPR
# 0x0081
integer XLS_Type_HCENTER
# 0x0083
integer XLS_Type_VCENTER
# 0x0084
integer XLS_Type_SHEET
# 0x0085
integer XLS_Type_PALETTE
# 0x0092
integer XLS_Type_SCL
# 0x00a0
integer XLS_Type_PAGESETUP
# 0x00a1
integer XLS_Type_MULRK
# 0x00bd
integer XLS_Type_MULBLANK
# 0x00be
integer XLS_Type_DBCELL
# 0x00d7
integer XLS_Type_XF
# 0x00e0
integer XLS_Type_MERGEDCELLS
# 0x00e5
integer XLS_Type_MSODRAWINGGROUP
# 0x00eb
integer XLS_Type_MSODRAWING
# 0x00ec
integer XLS_Type_SST
# 0x00fc
integer XLS_Type_LABELSST
# 0x00fd
integer XLS_Type_EXTSST
# 0x00ff
integer XLS_Type_EXTERNALBOOK
# 0x01ae
integer XLS_Type_DATAVALIDATIONS
# 0x01b2
integer XLS_Type_TXO
# 0x01b6
integer XLS_Type_HYPERLINK
# 0x01b8
integer XLS_Type_DATAVALIDATION
# 0x01be
integer XLS_Type_DIMENSION
# 0x0200
integer XLS_Type_BLANK
# 0x0201
integer XLS_Type_NUMBER
# 0x0203
integer XLS_Type_LABEL
# 0x0204
integer XLS_Type_BOOLERR
# 0x0205
integer XLS_Type_STRING
# 0x0207
integer XLS_Type_ROW
# 0x0208
integer XLS_Type_INDEX
# 0x020b
integer XLS_Type_ARRAY
# 0x0221
integer XLS_Type_DEFAULTROWHEIGHT
# 0x0225
integer XLS_Type_WINDOW2
# 0x023e
integer XLS_Type_RK
# 0x027e
integer XLS_Type_STYLE
# 0x0293
integer XLS_Type_FORMAT
# 0x041e
integer XLS_Type_SHAREDFMLA
# 0x04bc
integer XLS_Type_BOF
# 0x0809
integer XLS_Type_SHEETPROTECTION
# 0x0867
integer XLS_Type_RANGEPROTECTION
# 0x0868
integer XLS_Type_SHEETLAYOUT
# 0x0862
integer XLS_Type_XFEXT
# 0x087d
integer XLS_Type_PAGELAYOUTVIEW
# 0x088b
integer XLS_Type_UNKNOWN
# 0xffff
integer MS_BIFF_CRYPTO_NONE
# 0
integer MS_BIFF_CRYPTO_XOR
# 1
integer MS_BIFF_CRYPTO_RC4
# 2
integer REKEY_BLOCK
# 0x400
Properties summary
private string $_summaryInformation

Summary Information stream data.

Summary Information stream data.

#
private string $_documentSummaryInformation

Extended Summary Information stream data.

Extended Summary Information stream data.

#
private string $_userDefinedProperties

User-Defined Properties stream data.

User-Defined Properties stream data.

#
private string $_data

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

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

#
private integer $_dataSize

Size in bytes of $this->_data

Size in bytes of $this->_data

#
private integer $_pos

Current position in stream

Current position in stream

#
private PHPExcel $_phpExcel

Workbook to be returned by the reader.

Workbook to be returned by the reader.

#
private PHPExcel_Worksheet $_phpSheet

Worksheet that is currently being built by the reader.

Worksheet that is currently being built by the reader.

#
private integer $_version

BIFF version

BIFF version

#
private string $_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'

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'

#
private array $_formats

Shared formats

Shared formats

#
private array $_objFonts

Shared fonts

Shared fonts

#
private array $_palette

Color palette

Color palette

#
private array $_sheets

Worksheets

Worksheets

#
private array $_externalBooks

External books

External books

#
private array $_ref

REF structures. Only applies to BIFF8.

REF structures. Only applies to BIFF8.

#
private array $_externalNames

External names

External names

#
private array $_definedname

Defined names

Defined names

#
private array $_sst

Shared strings. Only applies to BIFF8.

Shared strings. Only applies to BIFF8.

#
private boolean $_frozen

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

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

#
private boolean $_isFitToPages

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

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

#
private array $_objs

Objects. One OBJ record contributes with one entry.

Objects. One OBJ record contributes with one entry.

#
private array $_textObjects

Text Objects. One TXO record corresponds with one entry.

Text Objects. One TXO record corresponds with one entry.

#
private array $_cellNotes

Cell Annotations (BIFF8)

Cell Annotations (BIFF8)

#
private string $_drawingGroupData

The combined MSODRAWINGGROUP data

The combined MSODRAWINGGROUP data

#
private string $_drawingData

The combined MSODRAWING data (per sheet)

The combined MSODRAWING data (per sheet)

#
private integer $_xfIndex

Keep track of XF index

Keep track of XF index

#
private array $_mapCellXfIndex

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

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

#
private array $_mapCellStyleXfIndex

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

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

#
private array $_sharedFormulas

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

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

#
private array $_sharedFormulaParts

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

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

#
private integer $_encryption

The type of encryption in use

The type of encryption in use

# 0
private integer $_encryptionStartPos

The position in the stream after which contents are encrypted

The position in the stream after which contents are encrypted

# false
private PHPExcel_Reader_Excel5_RC4 $_rc4Key

The current RC4 decryption object

The current RC4 decryption object

# null
private integer $_rc4Pos

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

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

# 0
private string $_md5Ctxt

The current MD5 context state

The current MD5 context state

# null
Properties inherited from PHPExcel_Reader_Abstract
$_fileHandle, $_includeCharts, $_loadSheetsOnly, $_readDataOnly, $_readFilter
Autene API documentation generated by ApiGen